[committed] TILE-Gx/TILEPro: fix got relocations for merged .got/.got.plt
Walter Lee
walt@tilera.com
Mon Sep 17 10:57:00 GMT 2012
This patch fixes the computation of got relocations for when .got.plt
section is merged with .got.
Walter
* 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.
Index: bfd/elf32-tilepro.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-tilepro.c,v
retrieving revision 1.12
diff -u -p -r1.12 elf32-tilepro.c
--- bfd/elf32-tilepro.c 2 Sep 2012 12:17:26 -0000 1.12
+++ bfd/elf32-tilepro.c 17 Sep 2012 10:47:58 -0000
@@ -3092,7 +3092,7 @@ tilepro_elf_relocate_section (bfd *outpu
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 *outpu
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: bfd/elfxx-tilegx.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-tilegx.c,v
retrieving revision 1.14
diff -u -p -r1.14 elfxx-tilegx.c
--- bfd/elfxx-tilegx.c 2 Sep 2012 12:17:27 -0000 1.14
+++ bfd/elfxx-tilegx.c 17 Sep 2012 10:47:58 -0000
@@ -3479,7 +3479,7 @@ tilegx_elf_relocate_section (bfd *output
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
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;
More information about the Binutils
mailing list