bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/12893] New: gold reports duplicated symbols when symbols have


From: flameeyes at gmail dot com
Subject: [Bug gold/12893] New: gold reports duplicated symbols when symbols have version both in script and in source
Date: Wed, 15 Jun 2011 19:15:57 +0000

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: address@hidden
        ReportedBy: address@hidden


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,address@hidden");

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



reply via email to

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