http://sourceware.org/bugzilla/show_bug.cgi?id=12893

           Summary: gold reports duplicated symbols when symbols have
                    version both in script and in source
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: i...@airs.com
        ReportedBy: flamee...@gmail.com


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

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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