https://bugs.llvm.org/show_bug.cgi?id=44105
Bug ID: 44105
Summary: Clang generates @PLT branches for powerpc, even when
built without -fPIC
Product: clang
Version: unspecified
Hardware: Macintosh
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: chmeeed...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
A simple program:
int main(int);
int __start(void) {
return main(0);
}
When built with clang for powerpc: cc -m32 -ffreestanding -o freestanding.o
generates R_PPC_PLTREL24 relocations, when it should be generating only
R_PPC_REL32 relocations, and letting the linker do the fixups. These
R_PPC_PLTREL24 relocations appear to be forcing GNU ld to use BSS-PLT instead
of secure-PLT. Generating to asm, hand-removing the @PLT annotation, GNU ld
does not choose bss-plt.
Not sure if this is a clang bug or LLVM bug, as the intermediate LLVM listing
is difficult to decipher.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs