aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2001-09-07 05:00:37 +0000
committerThiemo Seufer <ths@networkno.de>2001-09-07 05:00:37 +0000
commitcb56d3d327dc7fd17dbc3e3f95131cb6b312f18e (patch)
tree35b652e23a7ce84c43b26d953323437cd503d94d /bfd
parentc0a1a2e89b45a2eff4279723544ed4fd69d5cbdf (diff)
downloadgdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.zip
gdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.tar.gz
gdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.tar.bz2
* elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
of R_MIPS_PC16. * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL. (macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded PIC, BFD_RELOC_16_PCREL for the rest. (mips_ip): Likewise. (md_pcrel_from): return the right offset for the differently shifted pcrel relocs. (md_apply_fix): Handle BFD_RELOC_16_PCREL. * gas/mips/beq.d: Check branches to external labels. * gas/mips/beq.s: Likewise. * gas/mips/bge.d: Likewise. * gas/mips/bge.s: Likewise. * gas/mips/bgeu.d: Likewise. * gas/mips/bgeu.s: Likewise. * gas/mips/blt.d: Likewise. * gas/mips/blt.s: Likewise. * gas/mips/bltu.d: Likewise. * gas/mips/bltu.s: Likewise. * gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16. * gas/mips/empic.d: Likewise. * gas/mips/empic.s: Likewise. * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mips.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 86fff1a..5f9e0a0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
+ of R_MIPS_PC16.
+
2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 9ba61f0..935f4fb 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -6480,8 +6480,8 @@ mips_elf_calculate_relocation (abfd,
case R_MIPS_PC16:
value = mips_elf_sign_extend (addend, 16) + symbol - p;
- value = (bfd_vma) ((bfd_signed_vma) value / 4);
overflowed_p = mips_elf_overflow_p (value, 16);
+ value = (bfd_vma) ((bfd_signed_vma) value / 4);
break;
case R_MIPS_GOT_HI16: