|Multiply-defined global symbols email@example.com (Julian Brown) (2003-10-04)|
|Re: Multiply-defined global symbols firstname.lastname@example.org (Glen Herrmannsfeldt) (2003-10-06)|
|Re: Multiply-defined global symbols derkgwen@HotPOP.com (Derk Gwen) (2003-10-06)|
|Re: Multiply-defined global symbols email@example.com (Ken Rose) (2003-10-06)|
|From:||Julian Brown <firstname.lastname@example.org>|
|Date:||4 Oct 2003 14:45:31 -0400|
|Organization:||University of Bristol|
|Posted-Date:||04 Oct 2003 14:45:31 EDT|
I'm working on a port of GCC and Newlib to a new architecture, with my
own assembler and linker(*). I have a question that I'm not having much
luck finding the answer to. Mostly, my problem is with a "throwaway"
remark in one of the Newlib configuration scripts:
# The functions ldexp, frexp and modf are traditionally supplied in
# both libc.a and libm.a. We build them in libm.a and copy them over,
# along with some required supporting routines.
Now, in my mind that means there will be multiple definitions of those
functions, which will be an error when linking a program with the math
library (-lm). And in fact, that's exactly what's happening unless I
hack that particular "feature" out of Newlib.
So, is my understanding of global symbols (perhaps with particular
reference to libraries) generally incorrect? Is it OK to have multiple
global definitions of the same functions? Should I be looking at the
actual code referred to by the symbols and only complaining if it's
different, or something? (yuck!)
* At the time I felt my architecture was sufficiently "different" to
warrant this, rather than porting the GNU tools.
Return to the
Search the comp.compilers archives again.