]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PowerPC64 ha/lo insn checks
authorAlan Modra <amodra@gmail.com>
Mon, 19 Aug 2019 08:04:03 +0000 (17:34 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 19 Aug 2019 11:08:51 +0000 (20:38 +0930)
commit903b777ddeb4c11a7de12cab59124e777614edec
tree590cb0f578622b2f1d643a3d93c7360ce7a0bbc8
parent72c03e30ae783a5f38a8c124588a4536ae06e6ef
PowerPC64 ha/lo insn checks

These are done in ppc64_elf_edit_toc, which now also garbage collects
unused GOT entries.  The checks for legitimate instructions weren't
being done for the GOT relocs, unless the file also happened to have a
toc section.

* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
to has_optrel.
(struct _ppc64_elf_section_data): Likewise.
(ppc64_elf_check_relocs): Set has_optrel for more relocs.
(ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
than TOC loop.  Check PLT16 insns too.
bfd/ChangeLog
bfd/elf64-ppc.c