]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from trunk, r12234 (Some fixes for Android)
authorJulian Seward <jseward@acm.org>
Thu, 27 Oct 2011 10:54:23 +0000 (10:54 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 27 Oct 2011 10:54:23 +0000 (10:54 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_7_BRANCH@12242

Makefile.tool.am
README.android
coregrind/Makefile.am
coregrind/m_syswrap/syswrap-linux.c
memcheck/mc_replace_strmem.c

index f5297bba29233367bdb8cfabb349beb85e5430cc..7924b1bb2812b801396701ed25cbde5203c7e1e8 100644 (file)
@@ -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
index e3228576e8b7564033608304c3a26bbc2ce098df..cf45bf71f3b5e8e3772a710ec998bd17e9daa934 100644 (file)
@@ -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
index 6220f79c137fce11c90c6e72956e6e0d8905e289..15aa4ed6b3fcdc9e986f643067ec3671670a2e70 100644 (file)
@@ -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)
index aab005a1a50bdccb678e90af3641e2c6ddede1ed..f0b94edfe4a8468fafd7fb3d8bf0682fb4fa664e 100644 (file)
@@ -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 ""
index d29dc5979169ff35941c3f673190f328a72ac310..c0c2855df833d77ed9e79a227b576d0879eb0be2 100644 (file)
@@ -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)