bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12001] New: Linker includes archive members when symbols therein


From: mark at codesourcery dot com
Subject: [Bug ld/12001] New: Linker includes archive members when symbols therein have already been defined
Date: 9 Sep 2010 20:55:28 -0000

In this scenario:

f.c
===
void f() {}

main.c
======
int main () { f(); }

$ gcc -c f.c
$ ar cr libf.a f.o
$ gcc main.c -Wl,--defsym=f=4 -L. -lf

the linker pulls in f.o from libf.a, even though f has been explicitly defined
on the command line.

As described here:

http://sourceware.org/ml/binutils/2010-09/msg00110.html

the consensus is that this is a defect in GNU LD and in Gold.

-- 
           Summary: Linker includes archive members when symbols therein
                    have already been defined
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: mark at codesourcery dot com
                CC: bug-binutils at gnu dot org


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



reply via email to

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