This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: GNU-ld behaviour does not match native linker behaviour
- To: nickc at cygnus dot com
- Subject: Re: GNU-ld behaviour does not match native linker behaviour
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 8 Dec 1999 21:46:36 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <199912082041.MAA20759@elmo.cygnus.com>
Date: Wed, 8 Dec 1999 12:41:26 -0800
From: Nick Clifton <nickc@cygnus.com>
: Note that change 2 must not be made for the a.out object file format.
: a.out defines a different, and rather odd, procedure for linking
: against common symbols in archives. See aout_link_check_ar_symbols in
: aoutx.h.
I think that this is the real problem. There is no way that we can
know what the target file format is when we are creating the archive,
so we cannot decide whether we should include commons in the symbol
map or not.
Sure, we can. Archives have a format just like object files do. Look
at coff-rs6000.c support to see how BFD can support a completely
different archive format.
(As an aside is there any reason why an archive cannot
contain object file sof multiple file formats ?)
No, there isn't. But it's reasonable to not provide a symbol map for
such an archive.
Actually, that suggests a different approach. Instead of replacing
compute_and_write_armap, just have that function call a new BFD target
function to decide whether to include a symbol in the archive map. In
that case we would make the decision based on the archive member.
Ian