https://bugs.llvm.org/show_bug.cgi?id=35439
Bug ID: 35439
Summary: lld produces more dynamic relocations in executable
than gold
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: rafael.espind...@gmail.com
CC: llvm-bugs@lists.llvm.org
Producing an executable with
.global _start
_start:
retq
.section .data.rel.ro,"aw",@progbits
.quad foo
.quad foo
Where foo is defined to be a function in a .so, lld will produce
0000000000202000 0000000100000001 R_X86_64_64 0000000000000000 foo + 0
0000000000202008 0000000100000001 R_X86_64_64 0000000000000000 foo + 0
gold will produce
0000000000402000 0000000100000007 R_X86_64_JUMP_SLOT 0000000000400220 foo + 0
That is, gold uses the plt hack even when the relocation is applied to a rw
section.
I don't think lld should do this by default as now there is an unnecessary plt.
I am reporting the bug mostly to document a case where lld's output is bigger.
We would consider a command line option if someone really needs the size
saving.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs