summaryrefslogtreecommitdiff
path: root/bfd/elfn32-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
commit951fcb52ab837b34eee3a086a4c2ffda4ea4dd28 (patch)
treeedc4f3f418a62de1a39d6211a4dcc93095b2a40a /bfd/elfn32-mips.c
parent6599e6026c8d5f756b89ec162af7ffc7ba416f19 (diff)
downloadbinutils-redhat-951fcb52ab837b34eee3a086a4c2ffda4ea4dd28.tar.gz
* 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/elfn32-mips.c')
-rw-r--r--bfd/elfn32-mips.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index d48046aa09..a0725943e5 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -2259,8 +2259,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);
}