mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Some fixes for Android:
* initial support for Pandaboard/Linaro * on Android/ARM, ask for non-executable stacks in the executables * disable Memcheck's strcasestr intercept; its use of tolower() causes the dynamic linker to fail. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12234
This commit is contained in:
parent
0509dad284
commit
68cf6ae28d
@ -59,6 +59,13 @@ TOOL_LDFLAGS_X86_DARWIN = \
|
||||
TOOL_LDFLAGS_AMD64_DARWIN = \
|
||||
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64
|
||||
|
||||
# On Android we must ask for non-executable stack, not sure why.
|
||||
if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
TOOL_LDFLAGS_ARM_LINUX += -Wl,-z,noexecstack
|
||||
endif
|
||||
endif
|
||||
|
||||
# NB for 64-bit darwin. We may want to set -Wl,-pagezero_size to
|
||||
# something smaller than the default of 4G, so as to facilitate
|
||||
# loading clients who are also linked thusly (currently m_ume.c
|
||||
|
||||
@ -25,10 +25,11 @@ export NDKROOT=/path/to/android-ndk-r6
|
||||
# NDKROOT above, this is merely to avoid repeated typing; none of the
|
||||
# commands read it.
|
||||
#
|
||||
# Currently the only supported value is: nexus_s
|
||||
# Currently the supported values are: nexus_s pandaboard
|
||||
# So choose one of the below:
|
||||
#
|
||||
export HWKIND=nexus_s # Samsung Nexus S
|
||||
|
||||
export HWKIND=pandaboard # Pandaboard running Linaro Android
|
||||
|
||||
# Then cd to the root of your Valgrind source tree.
|
||||
#
|
||||
@ -49,7 +50,7 @@ export CC=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
|
||||
# Do configuration stuff. Don't mess with the --prefix in the
|
||||
# configure command below, even if you think it's wrong.
|
||||
# You may need to set the --with-tmpdir path to something
|
||||
# different if /sdcard doesn't works on the device -- this is
|
||||
# different if /sdcard doesn't work on the device -- this is
|
||||
# a known cause of difficulties.
|
||||
|
||||
./autogen.sh
|
||||
|
||||
@ -52,6 +52,12 @@ valgrind_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
|
||||
valgrind_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
|
||||
endif
|
||||
# On Android we must ask for non-executable stack, not sure why.
|
||||
if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_LDFLAGS += -Wl,-z,noexecstack
|
||||
endif
|
||||
endif
|
||||
|
||||
vgdb_SOURCES = vgdb.c
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
|
||||
@ -5173,11 +5173,13 @@ POST(sys_ioctl)
|
||||
*/
|
||||
if (1) {
|
||||
/* blunt-instrument approach */
|
||||
if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned (%08lx, %08lx)\n", ARG2, ARG3);
|
||||
if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned"
|
||||
" (%08lx, %08lx)\n", ARG2, ARG3);
|
||||
POST_MEM_WRITE(ARG3, 256);
|
||||
} else {
|
||||
/* be a bit more sophisticated */
|
||||
if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned (%08lx, %08lx) (fancy)\n", ARG2, ARG3);
|
||||
if (0) VG_(printf)("QQQQQQQQQQ c01c quick hack actioned"
|
||||
" (%08lx, %08lx) (fancy)\n", ARG2, ARG3);
|
||||
POST_MEM_WRITE(ARG3, 28);
|
||||
UInt* word = (UInt*)ARG3;
|
||||
if (word && word[2] && word[3] < 0x200/*stay sane*/)
|
||||
@ -5197,6 +5199,14 @@ POST(sys_ioctl)
|
||||
}
|
||||
/* END Nexus S specific ioctls */
|
||||
|
||||
|
||||
# elif defined(ANDROID_HARDWARE_pandaboard)
|
||||
|
||||
/* BEGIN Pandaboard specific ioctls */
|
||||
/* currently none are known */
|
||||
/* END Pandaboard specific ioctls */
|
||||
|
||||
|
||||
# else /* no ANDROID_HARDWARE_anything defined */
|
||||
|
||||
# warning ""
|
||||
@ -5205,6 +5215,7 @@ POST(sys_ioctl)
|
||||
# warning "building for. Currently known values are"
|
||||
# warning ""
|
||||
# warning " ANDROID_HARDWARE_nexus_s Samsung Nexus S"
|
||||
# warning " ANDROID_HARDWARE_pandaboard Pandaboard running Linaro Android"
|
||||
# warning ""
|
||||
# warning "Make sure you exactly follow the steps in README.android."
|
||||
# warning ""
|
||||
|
||||
@ -1493,7 +1493,9 @@ static inline void my_exit ( int x )
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
|
||||
# if !defined(VGPV_arm_linux_android)
|
||||
STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user