This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 3/7] S/390: ifunc: Fix for undefined ifunc symbols.
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Mon, 19 Oct 2015 16:54:15 +0200
- Subject: [PATCH 3/7] S/390: ifunc: Fix for undefined ifunc symbols.
- Authentication-results: sourceware.org; auth=none
- References: <1445266459-29117-1-git-send-email-krebbel at linux dot vnet dot ibm dot com>
bfd/ChangeLog:
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
elf_s390_finish_ifunc_symbol only for actually defined symbols.
* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
---
bfd/elf32-s390.c | 17 ++++++++---------
bfd/elf64-s390.c | 19 +++++++++----------
2 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 509d8f9..85ac298 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -3554,16 +3554,15 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
/* This symbol has an entry in the procedure linkage table. Set
it up. */
- if (s390_is_ifunc_symbol_p (h))
+ if (s390_is_ifunc_symbol_p (h) && h->def_regular)
{
- /* If we can resolve the IFUNC symbol locally we generate an
- IRELATIVE reloc. */
- elf_s390_finish_ifunc_symbol (output_bfd, info, h, htab, h->plt.offset,
- eh->ifunc_resolver_address +
- eh->ifunc_resolver_section->output_offset +
- eh->ifunc_resolver_section->output_section->vma);
- /* Fallthrough. Handling of explicit GOT slots of IFUNC
- symbols is below. */
+ elf_s390_finish_ifunc_symbol (output_bfd, info, h,
+ htab, h->plt.offset,
+ eh->ifunc_resolver_address +
+ eh->ifunc_resolver_section->output_offset +
+ eh->ifunc_resolver_section->output_section->vma);
+ /* Do not return yet. Handling of explicit GOT slots of
+ IFUNC symbols is below. */
}
else
{
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index d988b12..1add8d5 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3416,17 +3416,16 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
/* This symbol has an entry in the procedure linkage table. Set
it up. */
- if (s390_is_ifunc_symbol_p (h))
+ if (s390_is_ifunc_symbol_p (h) && h->def_regular)
{
- /* If we can resolve the IFUNC symbol locally we generate an
- IRELATIVE reloc. */
- elf_s390_finish_ifunc_symbol (output_bfd, info, h, htab, h->plt.offset,
- eh->ifunc_resolver_address +
- eh->ifunc_resolver_section->output_offset +
- eh->ifunc_resolver_section->output_section->vma);
- ;
- /* Fallthrough. Handling of explicit GOT slots of IFUNC
- symbols is below. */
+ elf_s390_finish_ifunc_symbol (output_bfd, info, h,
+ htab, h->plt.offset,
+ eh->ifunc_resolver_address +
+ eh->ifunc_resolver_section->output_offset +
+ eh->ifunc_resolver_section->output_section->vma);
+
+ /* Do not return yet. Handling of explicit GOT slots of
+ IFUNC symbols is below. */
}
else
{
--
1.9.1