This is the mail archive of the
mailing list for the binutils project.
unnecessary multiple definition error on link using 3.03
- From: Ken Faiczak <kfaiczak at SANDVINE dot com>
- To: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Mon, 18 Feb 2002 11:56:33 -0500
- Subject: unnecessary multiple definition error on link using 3.03
I am getting the following errors on link
(gcc 3.03, ld 2.11.2)
The same thing worked fine on 2.95....
libeverything.a(mem.o): In function `malloc':
mem.o(.text+0xb70): multiple definition of `malloc'
libmem.a(misc.o)(.text+0x208): first defined here
libeverything.a(mem.o): In function `free':
mem.o(.text+0xba0): multiple definition of `free'
libmem.a(misc.o)(.text+0x428): first defined here
I have a debug library libmem.a
which contains malloc(), free() etc...
in several .o files
it is also in the main library libeverything.a
in a single .o file (mem.o)
When I want to use the debug version I used to
(2.95) just added my libmem.a before libeverything.a
and it would ignore the multiple definitions since everything
was satisfied by the earlier .a file, and there were no unresolved
symbols requiring anything from mem.o
Q: Is this a bug in the latest binutils?
Q: How do I get rid of this new behaviour
without pulling mem.o out of libeverything.a?