This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Objects tied in by Linker


"Lehner, Michael" <michaellehner@siemens.com> writes:

> Gnulib.a is a self made archive. I extracted all the archives of gnu and mad a new one where all objects are in one archive. This is because of the more simple handling with Greenhills linker.
> The symbols ____strtoul_l_internal, _IO_vfprintf, ____strtoll_l_internal and ____strtoull_l_internal can be solved by strtoll_l.o, strtoull_l.o, strtoul_l.o and vfprintf.o but then I get the following multiply definitions:
> [elxr] (error) symbol __strtol_ul_max_tab multiply defined in:
> frame\src\gnulib.a(strtol_l.o)
>  frame\src\gnulib.a(strtoul_l.o)

This is not the GNU linker.

This error is happening because that symbol is defined in a linkonce
section.  This is a type of section supported by the GNU linker which
causes it to only appear in the executable once.  The ELF standard
supports a similar notion, the section group, and perhaps this source
code will eventually shift over (or maybe it already has, I don't
know).

Your simplest fix is going to be to locate those tables in the source
code and make them static.  This will cause some duplication in the
executable but should work correctly.

Ian


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