aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-07-27 21:18:52 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-07-27 21:18:52 +0000
commit9684f07814af5cabe84dfeb3f4a178b9a828e44d (patch)
tree32e10ebbf817ac9a652c3738e017d6eb95926e48 /bfd/elf32-mips.c
parent2b2c11bd2d615b62f1e69de2e2dd64a4bb3252de (diff)
downloadgdb-9684f07814af5cabe84dfeb3f4a178b9a828e44d.zip
gdb-9684f07814af5cabe84dfeb3f4a178b9a828e44d.tar.gz
gdb-9684f07814af5cabe84dfeb3f4a178b9a828e44d.tar.bz2
* elfxx-mips.h: Include "elf/mips.h".
(gprel16_reloc_p): New static inline function. * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]: Use got16_reloc_p. (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use gprel16_reloc_p. * elf32-mips.c (mips_info_to_howto_rel): Likewise. * elfn32-mips.c (mips_info_to_howto_rel): Likewise.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c987ff9..5155557 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1422,8 +1422,7 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
when we do the relocation, because the symbol manipulations done
by the linker may cause us to lose track of the input BFD. */
if (((*cache_ptr->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
- && (r_type == (unsigned int) R_MIPS_GPREL16
- || r_type == (unsigned int) R_MIPS_LITERAL))
+ && (gprel16_reloc_p (r_type) || r_type == (unsigned int) R_MIPS_LITERAL))
cache_ptr->addend = elf_gp (abfd);
}