This is the mail archive of the
mailing list for the binutils project.
Re: [committed] MIPS/BFD: Respect the ELF gABI dynamic symbol table sort requirement
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Cc: Tristan Gingold <gingold at adacore dot com>, James Cowgill <James dot Cowgill at imgtec dot com>
- Date: Mon, 13 Feb 2017 14:45:04 +0000
- Subject: Re: [committed] MIPS/BFD: Respect the ELF gABI dynamic symbol table sort requirement
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.email@example.com>
On Thu, 2 Feb 2017, Maciej W. Rozycki wrote:
> Ensure all local symbols precede external symbols in the dynamic symbol
> No local symbols are expected to make it to the dynamic symbol table
> except for section symbols already taken care of, so this is really a
> safeguard only against a potential BFD bug otherwise not so harmful,
> which may become a grave one due to a symbol table sorting requirement
> violation (see PR ld/20828 for an example). This means however that no
> test suite coverage is possible for this change as code introduced here
> is not normally expected to trigger.
> Logically split then the part of the dynamic symbol table which is not
> global offset table mapped, into a local area at the beginning and an
> external area following. By the time `mips_elf_sort_hash_table' is
> called we have the number of local dynamic symbol table entries (section
> and non-section) already counted in `local_dynsymcount', so use it to
> offset the external area from the beginning.
> * elfxx-mips.c (mips_elf_hash_sort_data): Add
> (mips_elf_sort_hash_table): Handle it.
> (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
> symbols bump up `max_local_dynindx' rather than
I have been told the issue outstanding with PR ld/20828 and version
symbols causes non-working executables to be produced such as in the case
I have therefore decided to backport this change (and its 3 preparatory
cleanups) to 2.28 to make people's life easier, as it makes executables
work while not making them otherwise any worse than now -- the binding of
any version symbols remains local, which is incorrect, or at least
inconsistent, however very unlikely to cause any problem.