Fix computation of got relocations for when .got.plt section is merged
authorWalter Lee <walt@tilera.com>
Mon, 17 Sep 2012 10:53:38 +0000 (10:53 +0000)
committerWalter Lee <walt@tilera.com>
Mon, 17 Sep 2012 10:53:38 +0000 (10:53 +0000)
with .got.
* elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
of got relocations for when .got.plt section is merged with .got.
* elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.

bfd/ChangeLog
bfd/elf32-tilepro.c
bfd/elfxx-tilegx.c

index 49c71dd826af1bb020d069b6ce057065982f1817..8133188f681fef77e8dfc91b635dd435211a0a74 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-17  Walter Lee  <walt@tilera.com>
+
+       * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
+       of got relocations for when .got.plt section is merged with .got.
+       * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
+
 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
 
        * configure: Regenerate.
index cbb65c6b1a48405fe14ad2492ec3c5404b666b51..f522b38cf386ad7da011486faf2683f7433cfc8d 100644 (file)
@@ -3092,7 +3092,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  local_got_offsets[r_symndx] |= 1;
                }
            }
-         relocation = htab->elf.sgot->output_offset + off - got_base;
+         relocation = off;
          break;
 
         case R_TILEPRO_JOFFLONG_X1_PLT:
@@ -3511,7 +3511,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          if (off >= (bfd_vma) -2)
            abort ();
 
-         relocation = htab->elf.sgot->output_offset + off - got_base;
+         relocation = off;
          unresolved_reloc = FALSE;
          howto = tilepro_elf_howto_table + r_type;
          break;
index 3bcdd3a8d3784c2966ed302846b2016275b423a3..a57654facabdcda4d80fef33af4af00128056075 100644 (file)
@@ -3479,7 +3479,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  local_got_offsets[r_symndx] |= 1;
                }
            }
-         relocation = htab->elf.sgot->output_offset + off - got_base;
+         relocation = off;
          break;
 
         case R_TILEGX_JUMPOFF_X1_PLT:
@@ -3926,7 +3926,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          if (off >= (bfd_vma) -2)
            abort ();
 
-         relocation = htab->elf.sgot->output_offset + off - got_base;
+         relocation = off;
          unresolved_reloc = FALSE;
          howto = tilegx_elf_howto_table + r_type;
          break;