]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-ppc.c
PR 20472, PowerPC64 ifunc confusion
authorAlan Modra <amodra@gmail.com>
Fri, 19 Aug 2016 01:36:41 +0000 (11:06 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 19 Aug 2016 01:36:41 +0000 (11:06 +0930)
commit8a2058b5e3318a337a6fecd61b91349d1131758e
treedfa9bedd7bf539614107c9e1ededc173a32b5c18
parente47d628fad1517ff91e8d66eb4609d84c35a2b1c
PR 20472, PowerPC64 ifunc confusion

This patch fixes quite a lot of confusion in allocate_dynrelocs over
ifuncs.  Function descriptors make ELFv1 quite different to ELFv2.

PR 20472
* elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test.
(readonly_dynrelocs): Comment fix.
(global_entry_stub): New function.
(ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test.  Match
ELFv2 code deciding on dynamic relocs vs. global entry stubs to
that in size_global_entry_stubs, handling ifunc too.  Delete dead
weak sym code.
(allocate_dynrelocs): Ensure dyn_relocs field is cleared when no
dyn_relocs are needed.  Correct handling of ifunc dyn_relocs.
Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for
undefweak syms.  Expand and correct comments.
(size_global_entry_stubs): Ensure symbol is defined.
(ppc64_elf_relocate_section): Match condition under which
dyn_relocs are emitted to that in allocate_dynrelocs.
bfd/ChangeLog
bfd/elf64-ppc.c