aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-s390.c
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-09-03 12:03:48 +0000
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-09-03 12:03:48 +0000
commit31db78f6a33ede3527772025eabf73373638077c (patch)
treea2aae5d2d4054c0c099cd9ae8c7302f47bd553cc /bfd/elf32-s390.c
parentf253d86d7f3da50f46117b753ae763dc393a13c9 (diff)
downloadgdb-31db78f6a33ede3527772025eabf73373638077c.zip
gdb-31db78f6a33ede3527772025eabf73373638077c.tar.gz
gdb-31db78f6a33ede3527772025eabf73373638077c.tar.bz2
2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for local and global ifunc symbols. * elf64-s390.c (elf_s390_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r--bfd/elf32-s390.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 039de3a..d6eedfa 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -2349,6 +2349,10 @@ elf_s390_relocate_section (bfd *output_bfd,
switch (r_type)
{
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ relocation -= htab->elf.sgot->output_section->vma;
+ break;
case R_390_GOTPLT12:
case R_390_GOTPLT16:
case R_390_GOTPLT20:
@@ -2625,9 +2629,9 @@ elf_s390_relocate_section (bfd *output_bfd,
/* For local symbols or if we didn't make a PLT entry for
this symbol resolve the symbol directly. */
- if ( h == NULL
+ if (h == NULL
|| h->plt.offset == (bfd_vma) -1
- || htab->elf.splt == NULL)
+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
{
relocation -= htab->elf.sgot->output_section->vma;
break;