This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: .gnu.warning.foo interferes with archive-member rules
- From: Alan Modra <amodra at gmail dot com>
- To: Roland McGrath <mcgrathr at google dot com>
- Cc: bug-binutils at gnu dot org, binutils at sourceware dot org
- Date: Wed, 8 Jun 2011 10:05:40 +0930
- Subject: Re: .gnu.warning.foo interferes with archive-member rules
- References: <x57jlixed1md.fsf@frobland.mtv.corp.google.com> <20110607090830.GA4172@bubble.grove.modra.org> <BANLkTimL5RxUHv0JzxxV_JsMcyWwBKQh+eF7ene2SPAEJEjj8A@mail.gmail.com>
On Tue, Jun 07, 2011 at 09:50:18AM -0700, Roland McGrath wrote:
> Thanks! I don't understand your changes at all off hand, and I strongly
> suspected that the patch I tried was too simple-minded to be right.
Setting "follow" true for the elf_link_hash_lookup calls in
_bfd_elf_archive_symbol_lookup means we get to the real symbol in the
elf_link_add_archive_symbols loop you were patching. We want that
because elf_link_add_archive_symbols needs to make a decision
depending on whether the symbol is defined or not, and specially treat
commons. Indirect and warning syms can point to any other sym type.
The lang_one_common change is needed in any function called by
bfd_link_hash_traverse. When warning symbols are created, they
replace the "real" entry in the hash table, so you never get to see
the real symbol in a hash traversal.
--
Alan Modra
Australia Development Lab, IBM