diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-05-18 16:51:54 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-05-18 16:51:54 -0400 |
commit | c093e2e8201524db0d638920e76bcb6b1d925f3a (patch) | |
tree | 7849aea9b175f2fe1d74e2c35e136199e8a9fb75 /arch/mips/bits/setjmp.h | |
parent | 43e9f652bf4b2195b04fc14c93db591b30a7b790 (diff) | |
download | musl-c093e2e8201524db0d638920e76bcb6b1d925f3a.tar.gz |
reprocess libc/ldso RELA relocations in stage 3 of dynamic linking
this fixes a regression on powerpc that was introduced in commit
f3ddd173806fd5c60b3f034528ca24542aecc5b9. global data accesses on
powerpc seem to be using a translation-unit-local GOT filled via
R_PPC_ADDR32 relocations rather than R_PPC_GLOB_DAT. being a non-GOT
relocation type, these were not reprocessed after adding the main
application and its libraries to the chain, causing libc code not to
see copy relocations in the main program, and therefore to use the
pre-copy-relocation addresses for global data objects (like environ).
the motivation for the dynamic linker only reprocessing GOT/PLT
relocation types in stage 3 is that these types always have a zero
addend, making them safe to process again even if the storage for the
addend has been clobbered. other relocation types which can be used
for address constants in initialized data objects may have non-zero
addends which will be clobbered during the first pass of relocation
processing if they're stored inline (REL form) rather than out-of-line
(RELA form).
powerpc generally uses only RELA, so this patch is sufficient to fix
the regression in practice, but is not fully general, and would not
suffice if an alternate toolchain generated REL for powerpc.
Diffstat (limited to 'arch/mips/bits/setjmp.h')
0 files changed, 0 insertions, 0 deletions