summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwalt <walt>2012-09-17 10:53:37 +0000
committerwalt <walt>2012-09-17 10:53:37 +0000
commit4d137c8f0a9f9bd0a237223560dbc7f256c6d6e1 (patch)
treec3a0a179c2ea6a26047f743f0c36d91f144a2bc4
parentdccd1ae21942613ca1b2371f45dcea1b8d0588e8 (diff)
downloadgdb-4d137c8f0a9f9bd0a237223560dbc7f256c6d6e1.tar.gz
Fix computation of got relocations for when .got.plt section is merged
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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-tilepro.c4
-rw-r--r--bfd/elfxx-tilegx.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 49c71dd826a..8133188f681 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index cbb65c6b1a4..f522b38cf38 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -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;
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 3bcdd3a8d37..a57654facab 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -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;