https://sourceware.org/bugzilla/show_bug.cgi?id=17313
Bug ID: 17313
Summary: --just-symbols= leads to discarded dynamic section
Product: binutils
Version: 2.25 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
[hjl@gnu-6 lea-2]$ cat lea1.s
.data
.globl foo
foo:
.quad -1
.text
.globl _start
.type _start, @function
_start:
movq foo@GOTPCREL(%rip), %rax
[hjl@gnu-6 lea-2]$ cat lea2.s
.text
.globl bar
.type bar, @function
bar:
movq foo@GOTPCREL(%rip), %rax
movq foo@GOTPCREL(%rip), %rax
[hjl@gnu-6 lea-2]$ make
gcc -c -o lea2.o lea2.s
gcc -c -o lea1.o lea1.s
./ld -m elf_x86_64 --just-symbols=lea2.o -Bsymbolic -shared -o libfoo.so lea1.o
./ld: discarded output section: `.got.plt'
make: *** [libfoo.so] Error 1
[hjl@gnu-6 lea-2]$
elf_link_add_object_symbols calls _bfd_elf_link_create_dynamic_sections
with input which will be discarded later.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils