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. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils