summaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>2013-05-30 20:27:20 +0000
committerCatherine Moore <clm@redhat.com>2013-05-30 20:27:20 +0000
commit5f906e3cfeff8e40a750c9ab35bc306bd2e78edf (patch)
tree8338ab1ce2f6000e7283499ccd5f186f26ac6992 /bfd/elf32-mips.c
parent8519296d45d604071bb348c78d7023a7dba11a73 (diff)
downloadbinutils-redhat-5f906e3cfeff8e40a750c9ab35bc306bd2e78edf.tar.gz
2013-05-30 Paul Brook <paul@codesourcery.com>
bfd/ * bfd-in2.h: Regenerate. * elf32-mips.c (elf_mips_eh_howto): New. (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH. (bfd_elf32_bfd_reloc_name_lookup): Likewise. (mips_elf32_rtype_to_howto): Support R_MIPS_EH. * elf64-mips.c (elf_mips_eh_howto): New. (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH. (bfd_elf64_bfd_reloc_name_lookup): Likewise. (mips_elf64_rtype_to_howto): Support R_MIPS_EH. * libbfd.h: Regenerate. * reloc.c (BFD_RELOC_MIPS_EH): New. gas/ * config/tc-mips.c (md_apply_fix): Support BFD_RELOC_MIPS_EH. include/elf * mips.h (R_MIPS_EH): New.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 54ae641c2e..c3c58c6516 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1538,6 +1538,22 @@ static reloc_howto_type elf_mips_jump_slot_howto =
0x0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* Used in EH tables. */
+static reloc_howto_type elf_mips_eh_howto =
+ HOWTO (R_MIPS_EH, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_EH", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
dangerous relocation. */
@@ -2010,6 +2026,8 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
return &elf_mips_copy_howto;
case BFD_RELOC_MIPS_JUMP_SLOT:
return &elf_mips_jump_slot_howto;
+ case BFD_RELOC_MIPS_EH:
+ return &elf_mips_eh_howto;
}
}
@@ -2055,6 +2073,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &elf_mips_copy_howto;
if (strcasecmp (elf_mips_jump_slot_howto.name, r_name) == 0)
return &elf_mips_jump_slot_howto;
+ if (strcasecmp (elf_mips_eh_howto.name, r_name) == 0)
+ return &elf_mips_eh_howto;
return NULL;
}
@@ -2079,6 +2099,8 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
return &elf_mips_copy_howto;
case R_MIPS_JUMP_SLOT:
return &elf_mips_jump_slot_howto;
+ case R_MIPS_EH:
+ return &elf_mips_eh_howto;
default:
if (r_type >= R_MICROMIPS_min && r_type < R_MICROMIPS_max)
return &elf_micromips_howto_table_rel[r_type - R_MICROMIPS_min];