[PATCH] D114982: [ELF][PowerPC] Don't discard .got if 32-bit plt needs it
George Koehler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 2 12:30:17 PST 2021
kernigh added a comment.
I don't have commit access to LLVM.
You might wonder why this diff adds R_PPC32_PLTREL but not R_PPC64_CALL_PLT. My problem (where .got is missing) happened only in 32-bit code. Code that calls the plt must set register r30 in 32-bit code, or r2 in 64-bit. Most 64-bit code sets r2 = .TOC. = address of .got; LLD might keep .got because it sees this .TOC. reference. 32-bit -fPIC code can set r30 = somewhere in .got2, so there is no reference to .got, and LLD can discard .got unless we add R_PPC32_PLTREL to the list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114982/new/
https://reviews.llvm.org/D114982
More information about the llvm-commits
mailing list