summaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.h
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/elfxx-mips.h
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/elfxx-mips.h')
-rw-r--r--bfd/elfxx-mips.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 0b2226d26c..096bd13247 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -21,6 +21,7 @@
#include "elf/common.h"
#include "elf/internal.h"
+#include "elf/mips.h"
extern bfd_boolean _bfd_mips_elf_new_section_hook
(bfd *, asection *);
@@ -153,6 +154,12 @@ extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections [];
extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *);
+static inline bfd_boolean
+gprel16_reloc_p (unsigned int r_type)
+{
+ return r_type == R_MIPS_GPREL16 || r_type == R_MIPS16_GPREL;
+}
+
#define elf_backend_common_definition _bfd_mips_elf_common_definition
#define elf_backend_name_local_section_symbols \
_bfd_mips_elf_name_local_section_symbols