https://sourceware.org/bugzilla/show_bug.cgi?id=19784

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-6 pr19784]$ cat foo.c
static int
zero (int x) 
{
  return 0;
}

void * foo_ifunc (void) __asm__ ("foo");
void * foo_ifunc (void) { return zero ; }
__asm__(".type foo, %gnu_indirect_function");

__asm__(".hidden foo");
[hjl@gnu-6 pr19784]$ cat bar.c
extern int foo (void) __attribute__ ((visibility("hidden")));

int
bar ()
{
  return foo ();
}
[hjl@gnu-6 pr19784]$ make LD=ld
gcc  -pie -B./ -fPIC -O   -c -o foo.o foo.c
ld -Bsymbolic-functions -shared -o libfoo.so foo.o bar.o
ld: BFD (Linux/GNU Binutils) 2.26.51.0.2.20160302 internal error, aborting at
/net/gnu-6/export/linux/src/binutils/binutils/bfd/elf64-x86-64.c:4283 in
elf_x86_64_relocate_section

ld: Please report this bug.

Makefile:11: recipe for target 'libfoo.so' failed
make: *** [libfoo.so] Error 1
[hjl@gnu-6 pr19784]$

-- 
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

Reply via email to