2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Mon, 3 Sep 2012 12:03:48 +0000 (12:03 +0000)
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Mon, 3 Sep 2012 12:03:48 +0000 (12:03 +0000)
* elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
local and global ifunc symbols.
* elf64-s390.c (elf_s390_relocate_section): Likewise.

bfd/ChangeLog
bfd/elf32-s390.c
bfd/elf64-s390.c

index ee9937244e9afb106dbdbe7addf54b23a0984a93..189d52d1a6580cdbe035f8864a6c992cb52ae733 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2012-09-02  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
index 039de3afd2cc0998990beb876ad6302f4e0b06b9..d6eedfa7b53d33176586dd544f5e52374e03668c 100644 (file)
@@ -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;
index c8b57f46ace018e6e63ec2587893774512f0c925..19926c69f2d9ca4f66669964b321284191a40a5c 100644 (file)
@@ -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;
This page took 0.030812 seconds and 4 git commands to generate.