[all-commits] [llvm/llvm-project] e68f64: [ELF][PPC32] Make R_PPC32_PLTREL retain .got
George Koehler via All-commits
all-commits at lists.llvm.org
Thu Dec 16 18:07:52 PST 2021
Branch: refs/heads/release/13.x
Home: https://github.com/llvm/llvm-project
Commit: e68f640deecc4cc6318c14468101f4d819f93727
https://github.com/llvm/llvm-project/commit/e68f640deecc4cc6318c14468101f4d819f93727
Author: George Koehler <kernigh at gmail.com>
Date: 2021-12-16 (Thu, 16 Dec 2021)
Changed paths:
M lld/ELF/Relocations.cpp
M lld/test/ELF/ppc32-ifunc-nonpreemptible-pic.s
A lld/test/ELF/ppc32-reloc-pltrel.s
Log Message:
-----------
[ELF][PPC32] Make R_PPC32_PLTREL retain .got
PLT usage needs the first 12 bytes of the .got section. We need to keep .got and
DT_GOT_PPC even if .got/_GLOBAL_OFFSET_TABLE_ are not referenced (large PIC code
may only reference .got2), which is the case in OpenBSD's ld.so, leading
to a misleading error, "unsupported insecure BSS PLT object".
Fix this by adding R_PPC32_PLTREL to the list of hasGotOffRel.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D114982
(cherry picked from commit 885fb9a257faa14ec33ad972df81801483c85da2)
More information about the All-commits
mailing list