diff options
author | Du Chenyang <chenyang.du@intel.com> | 2014-04-18 19:17:40 +0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-18 16:00:55 -0700 |
commit | 865119efd47ae3cae5a0c09c6a9cc184a10614c1 (patch) | |
tree | 5ae0b5fcf94c9f1680c66398125ce9bc3074706e | |
parent | 9b22c21ceec0a65875081525218315d08bbd36b5 (diff) | |
download | bionic-865119efd47ae3cae5a0c09c6a9cc184a10614c1.zip bionic-865119efd47ae3cae5a0c09c6a9cc184a10614c1.tar.gz bionic-865119efd47ae3cae5a0c09c6a9cc184a10614c1.tar.bz2 |
Temporarily disable text relocation warnings for x86 libraries
Too many such warnings will cause CTS failed. This issue still exists
in some x86 version libraries: libdvm.so/libart.so.
$scanelf -qT out/target/product/generic_x86/system/lib/libdvm.so
libdvm.so: (memory/data?) [0x2BAC7] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
libdvm.so: (memory/data?) [0x2BB98] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
libdvm.so: (memory/data?) [0x2EB28] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
libdvm.so: (memory/data?) [0x2EF87] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
libdvm.so: (memory/data?) [0x2EFAF] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
libdvm.so: (memory/data?) [0x2EFD7] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
libdvm.so: (memory/data?) [0x2EFFF] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
libdvm.so: (memory/data?) [0x2F027] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
Bug: https://code.google.com/p/android/issues/detail?id=68431
Change-Id: I11ecac282f1163e49a82156fce2a76cc2d619960
-rwxr-xr-x | linker/linker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index de7b04d..8e4c13c 100755 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -1833,8 +1833,10 @@ static bool soinfo_link_image(soinfo* si) { if (si->has_text_relocations) { // Make segments writable to allow text relocations to work properly. We will later call // phdr_table_protect_segments() after all of them are applied and all constructors are run. +#if !defined(__i386__) // 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)); |