This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: arm-wince-pe-ld: Multiply defined symbols in libgcj


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


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