PR24337, segfault in _bfd_elf_rela_local_sym, again
authorAlan Modra <amodra@gmail.com>
Fri, 15 Mar 2019 23:04:47 +0000 (09:34 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 16 Mar 2019 01:25:28 +0000 (11:55 +1030)
commit6835821be8bab8702e41e6946a7d8ee9441f0eee
tree2c8006c5192f86416c9a7bfb34f6e8f1848727ba
parentfdc01131eb74cf28ae6e7eb3f55ebe0d38839d3e
PR24337, segfault in _bfd_elf_rela_local_sym, again

Reverts commit 1ff31e135f, fixing the problem more generally.  There
are likely other place that will segfault on a NULL section.

PR 24337
* elf.c (_bfd_elf_rela_local_sym): Revert last change.
(_bfd_elf_rel_local_sym): Likewise.
* elflink.c (elf_link_input_bfd): Use bfd_und_section for
section of symbols with unrecognized shndx.
bfd/ChangeLog
bfd/elf.c
bfd/elflink.c