Re: Objects tied in by Linker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Lehner, Michael" <michaellehner@xxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux