https://sourceware.org/bugzilla/show_bug.cgi?id=21782
Bug ID: 21782
Summary: Fail to create static PIE with undefined weak symbols
Product: binutils
Version: 2.30 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: x86-64
[hjl@gnu-6 ld]$ cat x.s
.text
.global _start
.weak foo
_start:
movl foo(%rip), %eax
[hjl@gnu-6 ld]$ gcc -c x.s
[hjl@gnu-6 ld]$ ld -pie x.o
ld: x.o: relocation R_X86_64_PC32 against undefined symbol `foo' can not be
used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value
[hjl@gnu-6 ld]$
--
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