From 9684f07814af5cabe84dfeb3f4a178b9a828e44d Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Tue, 27 Jul 2010 21:18:52 +0000 Subject: * 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. --- bfd/elfxx-mips.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bfd/elfxx-mips.h') diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h index 0b2226d..096bd13 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 -- cgit v1.1