PR22537, Segmentation fault with static PIE
authorAlan Modra <amodra@gmail.com>
Thu, 19 Apr 2018 04:43:41 +0000 (14:13 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 19 Apr 2018 05:52:25 +0000 (15:22 +0930)
commitf6a8b8c7ac2d5369070a6b76a94ee0f3052433ff
treef6a3679089ff98ad14a02e4bca651ed417a4074e
parent8e415ce8fee234cd86f29d8f4ebbbdf0f9c0b031
PR22537, Segmentation fault with static PIE

The only stub type that makes sense for undefined symbols, or those
defined in shared libraries, is a plt call stub.  This patch arranges
to have "destination" set to -1 on such symbols, making for an easy
test in hppa_type_of_stub.

PR 22537
* elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
(hppa_type_of_stub): Don't return a long branch stub for
symbols other than those defined statically.
bfd/ChangeLog
bfd/elf32-hppa.c