This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Avoid 'multiple definition' error during linking?


Hi!

I'm trying to replace some functions found in libgcc.a (portions of fp-bit, specifically).  Trouble is, when I link, I get this:

fp-bit.c(.text+0x320): multiple definition of `__addsf3'
fp-bit.o:fp-bit.c:30: first defined here
/usr/lib/gcc-lib/sh-coff/2.95.2/m2/libgcc.a(fp-bit.o): In function `__subsf3':
fp-bit.c(.text+0x380): multiple definition of `__subsf3'

... and so on.

I don't get this error when I replace one or more functions in libc or libm (I'm using the newlib versions).  Even more strange, if I copy fp-bit.c from the gcc sources, modify it, and link it in its entireity, things seem to work fine as well.  If I disturb things in the file (i.e. remove the portions I'm not modifying, as I did to produce the above error messages), I start getting complaints again.

What's going on here?  Searches in the gcc and ld info files haven't helped me...


Thanks!

b.g.
-- 
Bill Gatliff
bgat@open-widgets.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]