diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2010-07-27 21:18:52 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2010-07-27 21:18:52 +0000 |
commit | 9684f07814af5cabe84dfeb3f4a178b9a828e44d (patch) | |
tree | 32e10ebbf817ac9a652c3738e017d6eb95926e48 /bfd/elfxx-mips.h | |
parent | 2b2c11bd2d615b62f1e69de2e2dd64a4bb3252de (diff) | |
download | gdb-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/elfxx-mips.h')
-rw-r--r-- | bfd/elfxx-mips.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |