aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-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/elfxx-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/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a94e609..7b89a83 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7727,7 +7727,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE);
addend = mips_elf_read_rel_addend (abfd, rel,
howto, contents);
- if (r_type == R_MIPS_GOT16)
+ if (got16_reloc_p (r_type))
mips_elf_add_lo16_rel_addend (abfd, rel, rel_end,
contents, &addend);
else
@@ -9196,7 +9196,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (htab != NULL);
BFD_ASSERT (name != NULL);
if (!htab->small_data_overflow_reported
- && (howto->type == R_MIPS_GPREL16
+ && (gprel16_reloc_p (howto->type)
|| howto->type == R_MIPS_LITERAL))
{
msg = _("small-data section exceeds 64KB;"