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: 9 Dec 1999 18:20:32 -0500
- CC: binutils at sourceware dot cygnus dot com, evelyn_mast at mentorg dot com
- References: <199912092049.MAA30844@elmo.cygnus.com>
Date: Thu, 9 Dec 1999 12:49:23 -0800
From: Nick Clifton <nickc@cygnus.com>
: 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.
Yes - I like this idea. Ok - so what do you think of this patch ?
This patch:
* Changes the default ELF linker so that an archive element will be
linked in if it has a symbol in the archive map which is currently
considered to be a common symbol.
* Adds a new field to the bfd_target structure called
_bfd_allow_commons_in_armap.
* Fixes all of the current BFD targets to initialise this new field
to false, except the default ELF target which initialises it to
true.
Looks basically good to me.
Note that we may have some confusion with existing ELF archives in
some scenarios. Existing ELF archives will have common symbols in the
armap. We will now wind up pulling those in to satisfy common symbols
in the executable. I'm not sure what to do about that. I don't know
how often it will be a real problem.
+ #define _bfd_achive_bsd_allow_commons_in_armap bfd_true
Typo.
Ian