https://sourceware.org/bugzilla/show_bug.cgi?id=17847
Bug ID: 17847 Summary: Confusing linker error message Product: binutils Version: 2.26 (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 pie-6]$ cat x.S .text .global _start _start: movl foo(%rip), %eax [hjl@gnu-6 pie-6]$ make gcc -B./ -c -o x.o x.S ./ld -o x -pie x.o x.o: In function `_start': (.text+0x2): undefined reference to `foo' ./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 make: *** [x] Error 1 [hjl@gnu-6 pie-6]$ Since foo is undefined, the second error message is confusing. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils