This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker generating incorrect sh_info values for .dynsym section
- From: Alan Modra <amodra at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 13 Aug 2016 00:14:08 +0930
- Subject: Re: Linker generating incorrect sh_info values for .dynsym section
- Authentication-results: sourceware.org; auth=none
- References: <87lh022o73.fsf@redhat.com> <20160812130740.GH3677@bubble.grove.modra.org>
On Fri, Aug 12, 2016 at 10:37:40PM +0930, Alan Modra wrote:
> On Fri, Aug 12, 2016 at 12:58:56PM +0100, Nick Clifton wrote:
> > It appears that the linker is generating incorrect values for the
> > sh_info field of the .dynsym section.
>
> Should be fixed with the following. As yet untested.
Tested and committed along with the inevitable testsuite update.
bfd/
* elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount.
* elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount.
(bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount.
ld/
* testsuite/ld-tic6x/shlib-1.rd: Correct expected .dynsym sh_info.
* testsuite/ld-tic6x/shlib-1b.rd: Likewise.
* testsuite/ld-tic6x/shlib-1r.rd: Likewise.
* testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
* testsuite/ld-tic6x/shlib-app-1.rd: Likewise.
* testsuite/ld-tic6x/shlib-app-1b.rd: Likewise.
* testsuite/ld-tic6x/shlib-app-1r.rd: Likewise.
* testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise.
* testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
* testsuite/ld-tic6x/static-app-1.rd: Likewise.
* testsuite/ld-tic6x/static-app-1b.rd: Likewise.
* testsuite/ld-tic6x/static-app-1r.rd: Likewise.
* testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
--
Alan Modra
Australia Development Lab, IBM