This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linking .common and .weak definitions
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Richard dot Earnshaw at arm dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 11 Feb 2003 11:26:46 +1030
- Subject: Re: linking .common and .weak definitions
- References: <200302101518.h1AFIFH07329@pc960.cambridge.arm.com>
bfd/elflink.h has this to say:
We treat a common symbol as a definition if the symbol in the
shared library is a function, since common symbols always
represent variables; this can cause confusion in principle, but
any such confusion would seem to indicate an erroneous program or
shared library. We also permit a common symbol in a regular
object to override a weak symbol in a shared object.
I'm curious as to why this code isn't working for you.
--
Alan Modra
IBM OzLabs - Linux Technology Centre