]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
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:57:29 +0000 (11:27 +0930)
commit7f27ccfcd5b86a6517a5c01d1cc29e87ac39c13c
treed6be23033e8d721e96dcfa07d30e260e609aca8c
parent7fb14a8e423b563c30b074bad66c3e8b0ca07b3d
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