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

           Summary: --start/end-group causes bogus 'multiple definition of
                    ...' error.
           Product: binutils
           Version: 2.20
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: i...@airs.com
        ReportedBy: pl...@agmk.net


testcase:

$ cat t.cpp
#include <cstdio>
void foo() { std::puts( "foo()" ); }

$ /local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/bin/x86_64-gnu-linux-g++
t.cpp -c -fpic
$ /local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/bin/x86_64-gnu-linux-ar rc
t.a t.o
$
/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/bin/x86_64-gnu-linux-ld.gold
-L /local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/lib64 -L
/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/usr/lib64 -z defs -shared -o
t.so --start-group --whole-archive t.a --no-whole-archive --end-group -lc

/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/bin/x86_64-gnu-linux-ld.gold:
error: t.a(t.o): multiple definition of 'foo()'
/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/bin/x86_64-gnu-linux-ld.gold:
t.a(t.o): previous definition here


with classic BFD linked it works fine.

-- 
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
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to