PowerPC fix for ifunc broken by d1eca1e4

This probably could be fixed by making changes in relocate_section for
ifunc, but it's simpler to disable the optimisation for ifunc.

	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
	use dynrelocs for ifunc.
	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
This commit is contained in:
Alan Modra 2014-08-18 18:14:56 +09:30
parent 1240be6b7d
commit 1009ef284f
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-08-18 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
use dynrelocs for ifunc.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
2014-08-18 Alan Modra <amodra@gmail.com>
PR 17287

View File

@ -5512,9 +5512,12 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
{
/* Taking a function's address in a read/write section
doesn't require us to define the function symbol in the
executable on a global entry stub. A dynamic reloc can
executable on a plt call stub. A dynamic reloc can
be used instead. */
if (h->pointer_equality_needed
&& h->type != STT_GNU_IFUNC
&& !htab->is_vxworks
&& !ppc_elf_hash_entry (h)->has_sda_refs
&& !readonly_dynrelocs (h))
{
h->pointer_equality_needed = 0;

View File

@ -7002,6 +7002,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
executable on a global entry stub. A dynamic reloc can
be used instead. */
if (h->pointer_equality_needed
&& h->type != STT_GNU_IFUNC
&& !readonly_dynrelocs (h))
{
h->pointer_equality_needed = 0;