[llvm-bugs] [Bug 32938] New: x86: Redundant dynamic relocation against function
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 5 07:39:44 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32938
Bug ID: 32938
Summary: x86: Redundant dynamic relocation against function
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: hjl.tools at gmail.com
CC: llvm-bugs at lists.llvm.org
[hjl at gnu-6 lld-2]$ cat x.c
extern void foo (void);
void *
foo_p ()
{
foo ();
return foo;
}
[hjl at gnu-6 lld-2]$ make
./clang -fpic -c -o x.o x.c
./ld.lld --shared -o x.so x.o
[hjl at gnu-6 lld-2]$ readelf -r x.so
Relocation section '.rela.dyn' at offset 0x240 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
0000000030d0 000100000006 R_X86_64_GLOB_DAT 0000000000000000 foo + 0
Relocation section '.rela.plt' at offset 0x258 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
000000002018 000100000007 R_X86_64_JUMP_SLO 0000000000000000 foo + 0
[hjl at gnu-6 lld-2]$ ld --shared -o x.so x.o
[hjl at gnu-6 lld-2]$ readelf -r x.so
Relocation section '.rela.dyn' at offset 0x240 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
000000200ff8 000300000006 R_X86_64_GLOB_DAT 0000000000000000 foo + 0
[hjl at gnu-6 lld-2]$
--
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/20170505/1f02e0ff/attachment.html>
More information about the llvm-bugs
mailing list