bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16467] ld fails with internal error in elf_x86_64_relocate_secti


From: zbyszek at in dot waw.pl
Subject: [Bug ld/16467] ld fails with internal error in elf_x86_64_relocate_section when .symver and ifunc magic is used
Date: Tue, 21 Jan 2014 19:14:38 +0000

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



--- Comment #12 from Zbigniew Jędrzejewski-Szmek <zbyszek at in dot wa
w.pl> ---

So, once again (with patched ld installed as /usr/bin/ld):



(gold, a versioned, b unversioned)

$ gcc -shared -o liba.so liba.c -fPIC -Wl,--version-script=liba.sym

-Wl,-fuse-ld=gold

$ gcc -shared -o libb.so libb.c -fPIC -L. -la -Wl,-fuse-ld=gold

$ LD_LIBRARY_PATH=. gcc -L. -lb test1.c -o test1 -Wl,-fuse-ld=gold

$ LD_LIBRARY_PATH=. ./test1

Segmentation fault (core dumped)



(gold, a versioned, b versioned)

$ gcc -shared -o liba.so liba.c -fPIC -Wl,--version-script=liba.sym

-Wl,-fuse-ld=gold

$ gcc -shared -o libb.so libb.c -fPIC -L. -la -Wl,--version-script=libb.s
ym

-Wl,-fuse-ld=gold

$ LD_LIBRARY_PATH=. gcc -L. -lb test1.c -o test1 -Wl,-fuse-ld=gold

$ LD_LIBRARY_PATH=. ./test1

bla bla



(bfd, a versioned, b versioned)

$ gcc -shared -o liba.so liba.c -fPIC -Wl,--version-script=liba.sym

-Wl,-fuse-ld=bfd

$ gcc -shared -o libb.so libb.c -fPIC -L. -la -Wl,--version-script=libb.s
ym

-Wl,-fuse-ld=bfd

$ LD_LIBRARY_PATH=. gcc -L. -lb test1.c -o test1 -Wl,-fuse-ld=bfd

$ LD_LIBRARY_PATH=. ./test1

Segmentation fault (core dumped)



(bfd, a versioned, b versioned)

$ gcc -shared -o liba.so liba.c -fPIC -Wl,--version-script=liba.sym

-Wl,-fuse-ld=bfd

$ gcc -shared -o libb.so libb.c -fPIC -L. -la -Wl,--version-script=libb.s
ym

-Wl,-fuse-ld=bfd

$ LD_LIBRARY_PATH=. gcc -L. -lb test1.c -o test1 -Wl,-fuse-ld=bfd

$ LD_LIBRARY_PATH=. ./test1

bla bla



So the unversioned libb fails to produce a working binary with either linke
r.

With your patch, versioned libb works with both linkers.





I also have more complicated test-case: systemd-logind.so in the systemd

project, from which

this testcase was derived. It is versioned and works with your patch. Thank
s!



-- 

You are receiving this mail because:

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]