This is arguably a bug in the developers' code itself, but at least bfd/ld seems to let it through so it could possibly be of interest to look at. The reduced testcase is as follows: # cat test-lib.c void a() { } __asm__ (".symver a,a@TEST"); # cat test.ver TEST { global: a; local: *; }; # gcc -Wl,--version-script=test.ver -fPIC -shared test-lib.c -o libtest.so /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld: error: /tmp/ccPGK7Km.o: multiple definition of 'a' /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld: /tmp/ccPGK7Km.o: previous definition here collect2: ld returned 1 exit status This is the code used by at least libdebian-installer, and it makes (some) sense if the static library also has to be usable (it would version the symbols in there as well).
CVSROOT: /cvs/src Module name: src Changes by: ian@sourceware.org 2011-06-17 13:31:33 Modified files: gold : ChangeLog resolve.cc Log message: PR gold/12893 * resolve.cc (Symbol_table::resolve): Don't give an error if a symbol is redefined with the exact same object and value. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.758&r2=1.759 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/resolve.cc.diff?cvsroot=src&r1=1.59&r2=1.60
Fixed. Thanks for reporting it.
*** Bug 12879 has been marked as a duplicate of this bug. ***