sparc64 segfault in finish_dynamic_symbol
authorAlan Modra <amodra@gmail.com>
Tue, 31 May 2022 11:29:04 +0000 (20:59 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 31 May 2022 11:44:00 +0000 (21:14 +0930)
commit30596893ab5c82081bfdf81cebe0b973f4e7c516
treec7a3a87248e9b90a06caf544f2ddfaefcd52f252
parente953510c3bfda9a39f1da76e00ab810917e32b78
sparc64 segfault in finish_dynamic_symbol

SYMBOL_REFERENCES_LOCAL can return true for undefined symbols.  This
can result in a segfault when running sparc64 ld/testsuite/ld-vsb
tests that expect a failure.

* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Don't
access u.def.section on non-default visibility undefined symbol.
bfd/elfxx-sparc.c