Fix hppa-linux pr22269-1 fail
authorAlan Modra <amodra@gmail.com>
Fri, 27 Oct 2017 04:34:25 +0000 (15:04 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 30 Oct 2017 00:33:50 +0000 (11:03 +1030)
commitd336fa6d820f50235c271ea327fadbf4ff6e1edd
treeebc4d2e681fb60129acfd0c690908f30b4edafa6
parent2b2d16760741356447ae10acc93695678db5e5ee
Fix hppa-linux pr22269-1 fail

Adds UNDEFWEAK_NO_DYNAMIC_RELOC in the rest of places needed in this
file, reduces dynamic relocations in a number of cases, and removes
some bogus code that was attempting to handle dynamic common symbols
specially.

PR 22269
* elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
ensure non_got_ref is not set due to debug references.
(elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling.  Use
SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
need for a plt entry.
(allocate_dynrelocs): Similarly for got entries.  Tidy code discarding
dynamic relocs when pic.  Remove bogus code attempting to handle
commons.
(elf32_hppa_relocate_section): Similarly.  Delete resolved_to_zero
and simplify.
(elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
and SYMBOL_REFERENCES_LOCAL in GOT handling.
bfd/ChangeLog
bfd/elf32-hppa.c