[llvm-bugs] [Bug 44105] New: Clang generates @PLT branches for powerpc, even when built without -fPIC
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 21 13:18:26 PST 2019
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: unassignedclangbugs at nondot.org
Reporter: chmeeedalf at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191121/8afb4755/attachment.html>
More information about the llvm-bugs
mailing list