[llvm-bugs] [Bug 36370] New: We should produce a R_X86_64_PLT32 for "call foo"
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 13 11:45:42 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36370
Bug ID: 36370
Summary: We should produce a R_X86_64_PLT32 for "call foo"
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: MC
Assignee: unassignedbugs at nondot.org
Reporter: rafael.espindola at gmail.com
CC: emaste at freebsd.org, llvm-bugs at lists.llvm.org
Given
call foo
.data
.long foo - .
gas after bd7ab16b4537788ad53521c45469a1bdae84ad4a will produce a
R_X86_64_PLT32 and a R_X86_64_PC32. MC produces two R_X86_64_PC32.
The advantage of R_X86_64_PLT32 is that it makes it obvious to the linker that
the address of the function is not being used. The linker has the flexibility
of directing the relocation to the final function (if it is local) or to a PLT
(if it is not).
--
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/20180213/a5891455/attachment-0001.html>
More information about the llvm-bugs
mailing list