aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-10-12 17:33:28 +0200
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-10-22 10:02:38 +0200
commit0a511368e2b896fe84f3b4bce5390e6269bcc57b (patch)
tree8fce96a1c99dc05794e29b2300fb9aaf4b39a135 /bfd
parente44c481aff721595eb9d28a7751d02300155148d (diff)
downloadgdb-0a511368e2b896fe84f3b4bce5390e6269bcc57b.zip
gdb-0a511368e2b896fe84f3b4bce5390e6269bcc57b.tar.gz
gdb-0a511368e2b896fe84f3b4bce5390e6269bcc57b.tar.bz2
S/390: ifunc: Fix for undefined ifunc symbols.
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-s390.c17
-rw-r--r--bfd/elf64-s390.c19
3 files changed, 23 insertions, 19 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6eec665..44dd4d2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+ * 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.
+
+2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
* elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
`head' parameter.
* elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
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
{