aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2001-11-01 01:33:47 +0000
committerChris Demetriou <cgd@google.com>2001-11-01 01:33:47 +0000
commitafdbd6d03b32209a99c57bfe2ee96e87a58a25bc (patch)
tree60c1b65cbc1e9743b1eea0d03fb250c7bf0a3129 /bfd/elf32-mips.c
parentd45fc520b151732db6a0e87a8684fa6c4f7d9b7a (diff)
downloadgdb-afdbd6d03b32209a99c57bfe2ee96e87a58a25bc.zip
gdb-afdbd6d03b32209a99c57bfe2ee96e87a58a25bc.tar.gz
gdb-afdbd6d03b32209a99c57bfe2ee96e87a58a25bc.tar.bz2
[ bfd/ChangeLog ]
2001-10-31 Chris Demetriou <cgd@demetriou.com> * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative relocations properly. [ gas/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded PIC code, assume pointers the same size as GPRs. (macro): In M_LA_AB handling for embedded PIC code, support "la $treg,foo-bar($breg)". In load/store handling (label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)" which is used by the compiler for switch statements. In load/store double multi-instruction macro handling (label ldd_std) add a comment that no special handling is currently done for embedded PIC. (mips_ip): In 'o' (16-bit offset) case, only accept 16 bit offsets. [ gas/testsuite/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * gas/mips/empic.s: Undo damage inflicted on 2000-12-02. * gas/mips/empic.d: Likewise. * gas/mips/elempic.d: Likewise (it was copied into other files). * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise. * gas/mips/empic2.s: New test to check new 'la' and 'lw' (and related ops) syntax, test loads with large offsets. * gas/mips/emcic2.d: Likewise. * gas/mips/mips.exp: Run the new test on ELF platforms.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 38b0f8b..7fee3c5 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1190,6 +1190,8 @@ _bfd_mips_elf_hi16_reloc (abfd,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
+ if (reloc_entry->howto->pc_relative)
+ relocation -= reloc_entry->address;
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;