unnecessary multiple definition error on link using 3.03
Daniel Jacobowitz
drow@mvista.com
Mon Feb 18 10:33:00 GMT 2002
More information about the Binutils mailing list
Mon Feb 18 10:33:00 GMT 2002
- Previous message (by thread): unnecessary multiple definition error on link using 3.03
- Next message (by thread): RFA: gprof-related patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
GCC 3.0.3 is more likely to emit calls to builtin memory functions; perhaps memcpy is in that first module? Try the -Map option to ld (-Wl,-Map from GCC). That will tell you why each given module is being pulled in. On Mon, Feb 18, 2002 at 11:56:33AM -0500, Ken Faiczak wrote: > 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? > > > ken > kfaiczak@sandvine.com > -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer
- Previous message (by thread): unnecessary multiple definition error on link using 3.03
- Next message (by thread): RFA: gprof-related patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list