http://sourceware.org/bugzilla/show_bug.cgi?id=14968
Bug #: 14968 Summary: Missing R_*_IRELATIVE relocation Product: binutils Version: 2.24 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sourceware.org ReportedBy: hjl.to...@gmail.com Classification: Unclassified [hjl@gnu-6 ifunc-global]$ cat foo.c static int two (void) { return 2; } void * foo_ifunc (void) __asm__ ("foo1") __attribute__ ((visibility ("hidden"))); __asm__(".type foo, %gnu_indirect_function"); __asm__("foo = foo1"); __asm__(".hidden foo"); __asm__(".global foo"); void * foo_ifunc (void) { return two; } extern int foo (void); int bar (void) { return foo (); } [hjl@gnu-6 ifunc-global]$ cat bar.c extern int foo (void); int (*foo1_ptr) (void) = foo; [hjl@gnu-6 ifunc-global]$ cat main.c #include <stdlib.h> extern int (*foo1_ptr) (void); int main (void) { int foo1; foo1 = foo1_ptr (); if (foo1 != 2) abort (); return 0; } [hjl@gnu-6 ifunc-global]$ make gcc -g -c -o main.o main.c gcc -g -fPIC -c -o bar.o bar.c gcc -g -fPIC -c -o foo.o foo.c ./ld --shared -o libfoo.so -z nocombreloc bar.o foo.o gcc -o main main.o libfoo.so -Wl,-rpath,. readelf -r --wide libfoo.so Relocation section '.rela.plt' at offset 0x220 contains 1 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000200430 0000000000000025 R_X86_64_IRELATIVE 26b ./main make: *** [all] Segmentation fault [hjl@gnu-6 ifunc-global]$ -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- 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