http://sourceware.org/bugzilla/show_bug.cgi?id=14956
Bug #: 14956
Summary: Unnecessary R_X86_64_NONE
Product: binutils
Version: 2.24 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
[hjl@gnu-hsw-1 ifunc-none]$ cat bar.c
extern int foo (void) __attribute__ ((weak, visibility ("hidden")));
int
bar (void)
{
return foo ();
}
[hjl@gnu-hsw-1 ifunc-none]$ cat foo.c
static int
one (void)
{
return -30;
}
void * foo_ifunc (void) __asm__ ("foo") __attribute__ ((visibility
("hidden")));
__asm__(".type foo, %gnu_indirect_function");
void *
foo_ifunc (void)
{
return one;
}
[hjl@gnu-hsw-1 ifunc-none]$ make
gcc -fPIC -c -o bar.o bar.c
gcc -fPIC -c -o foo.o foo.c
./ld --shared -o libfoo.so -z nocombreloc bar.o foo.o
readelf -r --wide libfoo.so
Relocation section '.rela.ifunc' at offset 0x200 contains 1 entries:
Offset Info Type Symbol's Value
Symbol's Name + Addend
0000000000000000 0000000000000000 R_X86_64_NONE 0
Relocation section '.rela.plt' at offset 0x218 contains 1 entries:
Offset Info Type Symbol's Value
Symbol's Name + Addend
0000000000200450 0000000000000025 R_X86_64_IRELATIVE
267
[hjl@gnu-hsw-1 ifunc-none]$
--
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
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils