PowerPC64 --emit-relocs support for notoc stubs
authorAlan Modra <amodra@gmail.com>
Wed, 29 Aug 2018 13:01:25 +0000 (22:31 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 31 Aug 2018 12:45:05 +0000 (22:15 +0930)
commit3d58e1fcfbedad71be7e539dfa2045ab2768f013
tree02576dd5d889cb91ae757a6c27822d36cecfc801
parent4a9699735b04d4629bd3dc418c265e7f0bc1f9ce
PowerPC64 --emit-relocs support for notoc stubs

This patch uses the newly defined high-part REL16 relocs to emit
relocations on the notoc stubs as we already do for other stubs.

* elf64-ppc.c (num_relocs_for_offset): New function.
(emit_relocs_for_offset): New function.
(use_global_in_relocs): New function, split out from..
(ppc_build_one_stub): ..here.  Output relocations for notoc stubs.
(ppc_size_one_stub): Calculate reloc count for notoc stubs.
(ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
bfd/ChangeLog
bfd/elf64-ppc.c