summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-10-23 13:45:01 -0700
committerElliott Hughes <enh@google.com>2013-10-23 13:45:01 -0700
commit5be2c5998c996ff9d5efb94c127d9b832a295822 (patch)
tree1385d4302c95d6e051f72bfad843d69bd6ee07f1
parentcdac5f73aca015287d1f40ff50d4fbf293a0c549 (diff)
downloadbionic-5be2c5998c996ff9d5efb94c127d9b832a295822.zip
bionic-5be2c5998c996ff9d5efb94c127d9b832a295822.tar.gz
bionic-5be2c5998c996ff9d5efb94c127d9b832a295822.tar.bz2
Don't warn about x86 text relocations. They're too prevalent.
We should fix this (and disallow it for x86_64), but for now let's get CTS running again. libdvm.so and libcutils.so are the main problems. $ scanelf -qT out/target/product/generic_x86/symbols/system/lib/libcutils.so libcutils.so: (memory/data?) [0x4125] in (optimized out: previous android_memset16) [0x4100] libcutils.so: (memory/data?) [0x424F] in (optimized out: previous android_memset16) [0x4100] libcutils.so: (memory/data?) [0x42F8] in (optimized out: previous android_memset16) [0x4100] libcutils.so: (memory/data?) [0x4349] in (optimized out: previous android_memset16) [0x4100] libcutils.so: (memory/data?) [0x4406] in (optimized out: previous android_memset16) [0x4100] libcutils.so: (memory/data?) [0x45AC] in (optimized out: previous android_memset32) [0x4590] libcutils.so: (memory/data?) [0x4650] in (optimized out: previous android_memset32) [0x4590] libcutils.so: (memory/data?) [0x46F9] in (optimized out: previous android_memset32) [0x4590] libcutils.so: (memory/data?) [0x474A] in (optimized out: previous android_memset32) [0x4590] libcutils.so: (memory/data?) [0x4807] in (optimized out: previous android_memset32) [0x4590] Bug: 11353056 Change-Id: Id4a76b310be7fe858a8a60d0d260b09913b66be9
-rwxr-xr-xlinker/linker.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 4f05c7a..c6264a3 100755
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1688,8 +1688,10 @@ static bool soinfo_link_image(soinfo* si) {
* phdr_table_protect_segments() after all of them are applied
* and all constructors are run.
*/
+#if !defined(ANDROID_X86_LINKER) // The platform itself has too many text relocations on x86.
DL_WARN("%s has text relocations. This is wasting memory and prevents "
"security hardening. Please fix.", si->name);
+#endif
if (phdr_table_unprotect_segments(si->phdr, si->phnum, si->load_bias) < 0) {
DL_ERR("can't unprotect loadable segments for \"%s\": %s",
si->name, strerror(errno));