summaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-09-03 12:03:46 +0000
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-09-03 12:03:46 +0000
commit4846a612930b20f9874cbfdc385d8f42711fcfd8 (patch)
treea7918be23267f75fb0a83e1007f8d8fb8e6a0838 /bfd/elf64-s390.c
parent02b16151df0ecc5c3a83a85a0f0e0a653b648523 (diff)
downloadbinutils-redhat-4846a612930b20f9874cbfdc385d8f42711fcfd8.tar.gz
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/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index c8b57f46ac..19926c69f2 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2306,6 +2306,11 @@ elf_s390_relocate_section (bfd *output_bfd,
switch (r_type)
{
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ case R_390_PLTOFF64:
+ relocation -= htab->elf.sgot->output_section->vma;
+ break;
case R_390_GOTPLT12:
case R_390_GOTPLT16:
case R_390_GOTPLT20:
@@ -2561,7 +2566,7 @@ elf_s390_relocate_section (bfd *output_bfd,
break;
if (h->plt.offset == (bfd_vma) -1
- || (htab->elf.splt == NULL && htab->elf.iplt == NULL))
+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -2587,9 +2592,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;