This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: arm-wince-pe-ld: Multiply defined symbols in libgcj
- From: Ian Lance Taylor <ian at airs dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: "Craig A. Vanderborgh" <craigv at voxware dot com>, binutils at sources dot redhat dot com
- Date: 03 Jun 2003 09:37:22 -0700
- Subject: Re: arm-wince-pe-ld: Multiply defined symbols in libgcj
- References: <1054574568.16498.68.camel@zetar> <m34r37kynr.fsf@redhat.com>
Nick Clifton <nickc@redhat.com> writes:
> The problem appears to be that the symbols are being defined in the
> .text section. If they were defined in a .gnu.linkonce.<section-name>
> section then the discarding should work. (See
> bfd/coffcode.h:styp_to_sec_flags). I guess that the .linkonce
> directive in gas is not doing the right thing. Well at least not for
> the arm-wince-pe port.
I don't think that is wholly accurate. The PE format supports
linkonce directly. See obj_coff_pe_handle_link_once in
gas/config/obj-coff.c. In PE, it should be OK for the compiler to use
.linkonce without resorting to using a special section name. See also
handle_COMDAT() in bfd/coffcode.h (a name which should be fixed to be
all lower case, as is normally done in GNU programs).
I agree in general that this should work, and I believe that it did
work once, and somebody should find out why it no longer works.
Ian