This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR ld/20828: Move symbol version processing ahead of GC symbol sweep
- From: Alan Modra <amodra at gmail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, James Cowgill <James dot Cowgill at imgtec dot com>, binutils at sourceware dot org
- Date: Thu, 2 Feb 2017 13:54:33 +1030
- Subject: Re: [PATCH] PR ld/20828: Move symbol version processing ahead of GC symbol sweep
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.00.1701311803300.13564@tp.orcam.me.uk>
I think you may be in trouble here:
if ((elf_tdata (output_bfd)->cverrefs == 0
&& elf_tdata (output_bfd)->cverdefs == 0)
|| _bfd_elf_link_renumber_dynsyms (output_bfd, info,
§ion_sym_count) == 0)
{
s = bfd_get_linker_section (dynobj, ".gnu.version");
s->flags |= SEC_EXCLUDE;
}
The problem being that _bfd_elf_export_symbol and the backend
size_dynamic_sections might make symbols dynamic where there were
possibly none before. Garbage collection also might change whether
there are dynamic symbols.
Another problem related to dynamic symbols is that running
_bfd_elf_link_assign_sym_version early means the tests of h->dynindx
in that function are no longer valid.
--
Alan Modra
Australia Development Lab, IBM