[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/13521] ld.gold prefers unversioned symbol over default version
From: |
jgunthorpe at gmail dot com |
Subject: |
[Bug gold/13521] ld.gold prefers unversioned symbol over default version |
Date: |
Wed, 02 Sep 2015 18:57:31 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=13521
--- Comment #7 from Jason Gunthorpe <jgunthorpe at gmail dot com> ---
Hi Cary,
HEAD behaves differently than the version in Vivid, but the result is not
identical to ld.
I tested c74be520ba8ed2d013d43916b923b837294343cc.
$ /tmp/binutils-gdb/build/gold/ld-new --sysroot=/ --build-id --eh-frame-hdr
-m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -z relro
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../.. t.o -lsctp -v -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
GNU gold (GNU Binutils 2.25.51.20150902) 1.11
$ readelf -s a.out | grep -i sctp
Symbol table '.dynsym' contains 8 entries:
7: 0000000000400550 0 FUNC GLOBAL DEFAULT UND
address@hidden (3)
Symbol table '.symtab' contains 40 entries:
36: 0000000000000000 0 FUNC GLOBAL DEFAULT UND sctp_connectx
.. and with sytem ld ..
$ readelf -s a.out | grep -i sctp
Symbol table '.dynsym' contains 8 entries:
7: 0000000000400560 0 FUNC GLOBAL DEFAULT UND
address@hidden (3)
Symbol table '.symtab' contains 66 entries:
56: 0000000000400560 0 FUNC GLOBAL DEFAULT UND sctp_connectx@
@VERS_3
Dynamic linking is OK - but the symtab from gold doesn't have any symbol
versions even on glibc symbols, so it is a different thing.
I think this bug can be closed, thanks
Jason
--
You are receiving this mail because:
You are on the CC list for the bug.