diff options
author | Rich Felker <dalias@aerifal.cx> | 2017-03-08 13:35:33 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-03-08 13:35:33 -0500 |
commit | fc85fb38605a8bf341c367b8ab0d36edab2bdbfc (patch) | |
tree | 310e34035a2503bf790606949ea1f9279eed35e5 /arch | |
parent | 827c4e6fbe46142049ef3d8bcb8f35951712797d (diff) | |
download | musl-fc85fb38605a8bf341c367b8ab0d36edab2bdbfc.tar.gz musl-fc85fb38605a8bf341c367b8ab0d36edab2bdbfc.tar.bz2 musl-fc85fb38605a8bf341c367b8ab0d36edab2bdbfc.tar.xz musl-fc85fb38605a8bf341c367b8ab0d36edab2bdbfc.zip |
fix ld-behavior-dependent crash in ppc64 ldso startup
the 32-bit pc-relative address for stage 2 of dynamic linker entry was
wrongly loaded with a zero-extending load instead of sign-extending
load, resulting in an invalid jump if the offset happened to be
negative, which depends on the linker's ordering of text sections.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc64/reloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc64/reloc.h b/arch/powerpc64/reloc.h index e1bad009..faf70acd 100644 --- a/arch/powerpc64/reloc.h +++ b/arch/powerpc64/reloc.h @@ -27,6 +27,6 @@ " bl 1f \n" \ " .long " #sym "-. \n" \ "1: mflr %1 \n" \ - " lwz %0, 0(%1) \n" \ + " lwa %0, 0(%1) \n" \ " add %0, %0, %1 \n" \ : "=r"(*(fp)), "=r"((long){0}) : : "memory", "lr" ) |