Setting sh_link for SHT_REL/SHT_RELA
authorAlan Modra <amodra@gmail.com>
Thu, 30 Mar 2023 01:40:16 +0000 (12:10 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 30 Mar 2023 04:48:02 +0000 (15:18 +1030)
commit6b958fe36b765f70878e8d3d002864967c4bc3a4
treee2e0d906f2a3f079e8ee0deb7785569dd7e4de50
parentea7672c10e0b762c02fd40ce94d490b56bc14675
Setting sh_link for SHT_REL/SHT_RELA

It's wrong to have an alloc reloc section trying to use a non-alloc
symbol table.

* elf.c (assign_section_numbers <SHT_REL, SHT_RELA>): Correct
comment.  Always set sh_link to .dynsym for alloc reloc
sections and to .symtab for non-alloc.
bfd/elf.c