https://sourceware.org/bugzilla/show_bug.cgi?id=19939
Bug ID: 19939 Summary: Incorrect error message for undefined symbols Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com Target Milestone: --- [hjl@gnu-6 xxx]$ cat x.S .text selector: #ifdef __x86_64__ movq foo@GOTPCREL(%rip), %rax #else movl foo@GOT(%eax), %eax #endif jmp xxx .type selector, %gnu_indirect_function .globl bar bar: jmp selector@PLT [hjl@gnu-6 xxx]$ make LD=ld gcc -B./ -c -o x.o x.S ld -shared -z defs -o x.so x.o ld: read-only segment has dynamic IFUNC relocations; recompile with -fPIC ld: failed to set dynamic section sizes: Bad value Makefile:24: recipe for target 'x.so' failed make: *** [x.so] Error 1 [hjl@gnu-6 xxx]$ The dynamic reloc in read-only section is against normal symbol, xxx, not IFUNC symbol, selector. -- 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