about summary refs log tree commit diff
path: root/INSTALL
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2022-04-25 10:30:26 -0700
committerFangrui Song <maskray@google.com>2022-04-25 10:30:27 -0700
commit1305edd42c44fee6f8660734d2dfa4911ec755d6 (patch)
tree8daeae573dc28b1c52f14e2348bf287eb58a26e0 /INSTALL
parent33e03f9cd2be4f2cd62f93fda539cc07d9c8130e (diff)
downloadglibc-1305edd42c44fee6f8660734d2dfa4911ec755d6.tar.gz
glibc-1305edd42c44fee6f8660734d2dfa4911ec755d6.tar.xz
glibc-1305edd42c44fee6f8660734d2dfa4911ec755d6.zip
elf: Move post-relocation code of _dl_start into _dl_start_final
On non-PI_STATIC_AND_HIDDEN architectures, getting the address of
_rtld_local_ro (for GLRO (dl_final_object)) goes through a GOT entry.
The GOT load may be reordered before self relocation, leading to an
unrelocated/incorrect _rtld_local_ro address.

84e02af1ebc9988126eebe60bf19226cea835623 tickled GCC powerpc32 to
reorder the GOT load before relative relocations, leading to ld.so
crash. This is similar to the m68k jump table reordering issue fixed by
a8e9b5b8079d18116ca69c9797e77804ecf2ee7e.

Move code after self relocation into _dl_start_final to avoid the
reordering. This fixes powerpc32 and may help other architectures when
ELF_DYNAMIC_RELOCATE is simplified in the future.
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions