diff options
author | Catherine Moore <clm@redhat.com> | 2013-05-30 20:27:21 +0000 |
---|---|---|
committer | Catherine Moore <clm@redhat.com> | 2013-05-30 20:27:21 +0000 |
commit | 067ec077d717e716b0dba87b9ebfa25074cd5453 (patch) | |
tree | 025bdeefd51e1f2e1da85bc67fac21f1da30ce8e | |
parent | 4e993a190a2602ee03f2dbad245d0c074e9b2362 (diff) | |
download | gdb-067ec077d717e716b0dba87b9ebfa25074cd5453.zip gdb-067ec077d717e716b0dba87b9ebfa25074cd5453.tar.gz gdb-067ec077d717e716b0dba87b9ebfa25074cd5453.tar.bz2 |
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.
-rw-r--r-- | bfd/ChangeLog | 14 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 1 | ||||
-rw-r--r-- | bfd/elf32-mips.c | 22 | ||||
-rw-r--r-- | bfd/elf64-mips.c | 23 | ||||
-rw-r--r-- | bfd/elfn32-mips.c | 23 | ||||
-rw-r--r-- | bfd/libbfd.h | 1 | ||||
-rw-r--r-- | bfd/reloc.c | 2 | ||||
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 1 | ||||
-rw-r--r-- | include/elf/ChangeLog | 4 | ||||
-rw-r--r-- | include/elf/mips.h | 1 |
11 files changed, 96 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d1ec430..d148669 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,17 @@ +2013-05-30 Paul Brook <paul@codesourcery.com> + + * 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. + 2013-05-29 Nick Clifton <nickc@redhat.com> * dwarf2.c (struct dwarf2_debug): Add fields for handling diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index efc1a55..f5b98c5 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2937,6 +2937,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 54ae641..c3c58c6 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]; diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index e692099..a0c5cc5 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -2671,6 +2671,23 @@ static reloc_howto_type elf_mips_jump_slot_howto = 0x0, /* src_mask */ 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 */ + /* Swap in a MIPS 64-bit Rel reloc. */ @@ -3276,6 +3293,8 @@ bfd_elf64_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_vtentry_howto; case BFD_RELOC_32_PCREL: return &elf_mips_gnu_pcrel32; + case BFD_RELOC_MIPS_EH: + return &elf_mips_eh_howto; case BFD_RELOC_MIPS_COPY: return &elf_mips_copy_howto; case BFD_RELOC_MIPS_JUMP_SLOT: @@ -3325,6 +3344,8 @@ bfd_elf64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_rela16_s2; if (strcasecmp (elf_mips_gnu_pcrel32.name, r_name) == 0) return &elf_mips_gnu_pcrel32; + if (strcasecmp (elf_mips_eh_howto.name, r_name) == 0) + return &elf_mips_eh_howto; if (strcasecmp (elf_mips_copy_howto.name, r_name) == 0) return &elf_mips_copy_howto; if (strcasecmp (elf_mips_jump_slot_howto.name, r_name) == 0) @@ -3351,6 +3372,8 @@ mips_elf64_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p) return &elf_mips_gnu_rel16_s2; case R_MIPS_PC32: return &elf_mips_gnu_pcrel32; + case R_MIPS_EH: + return &elf_mips_eh_howto; case R_MIPS_COPY: return &elf_mips_copy_howto; case R_MIPS_JUMP_SLOT: diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 131de33..2daf79e 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -2636,6 +2636,23 @@ static reloc_howto_type elf_mips_jump_slot_howto = 0x0, /* src_mask */ 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. */ @@ -3092,6 +3109,8 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_vtentry_howto; case BFD_RELOC_32_PCREL: return &elf_mips_gnu_pcrel32; + case BFD_RELOC_MIPS_EH: + return &elf_mips_eh_howto; case BFD_RELOC_MIPS_COPY: return &elf_mips_copy_howto; case BFD_RELOC_MIPS_JUMP_SLOT: @@ -3142,6 +3161,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_rela16_s2; if (strcasecmp (elf_mips_gnu_pcrel32.name, r_name) == 0) return &elf_mips_gnu_pcrel32; + if (strcasecmp (elf_mips_eh_howto.name, r_name) == 0) + return &elf_mips_eh_howto; if (strcasecmp (elf_mips_copy_howto.name, r_name) == 0) return &elf_mips_copy_howto; if (strcasecmp (elf_mips_jump_slot_howto.name, r_name) == 0) @@ -3168,6 +3189,8 @@ mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p) return &elf_mips_gnu_rel16_s2; case R_MIPS_PC32: return &elf_mips_gnu_pcrel32; + case R_MIPS_EH: + return &elf_mips_eh_howto; case R_MIPS_COPY: return &elf_mips_copy_howto; case R_MIPS_JUMP_SLOT: diff --git a/bfd/libbfd.h b/bfd/libbfd.h index c0006bf..9450729 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1187,6 +1187,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MICROMIPS_TLS_TPREL_HI16", "BFD_RELOC_MIPS_TLS_TPREL_LO16", "BFD_RELOC_MICROMIPS_TLS_TPREL_LO16", + "BFD_RELOC_MIPS_EH", "BFD_RELOC_MIPS_COPY", "BFD_RELOC_MIPS_JUMP_SLOT", diff --git a/bfd/reloc.c b/bfd/reloc.c index d4d98f7..4d57e23 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -2413,6 +2413,8 @@ ENUMX BFD_RELOC_MIPS_TLS_TPREL_LO16 ENUMX BFD_RELOC_MICROMIPS_TLS_TPREL_LO16 +ENUMX + BFD_RELOC_MIPS_EH ENUMDOC MIPS ELF relocations. COMMENT diff --git a/gas/ChangeLog b/gas/ChangeLog index eb53b16..ae07be8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2013-05-30 Paul Brook <paul@codesourcery.com> + + * config/tc-mips.c (md_apply_fix): Support BFD_RELOC_MIPS_EH. + 2013-05-29 Maciej W. Rozycki <macro@codesourcery.com> * write.c (resolve_reloc_expr_symbols): On REL targets don't diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1f16dc9..02b3cf3 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -15824,6 +15824,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) case BFD_RELOC_MICROMIPS_GOT_LO16: case BFD_RELOC_MICROMIPS_CALL_HI16: case BFD_RELOC_MICROMIPS_CALL_LO16: + case BFD_RELOC_MIPS_EH: if (fixP->fx_done) { offsetT value; diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index e7058f7..9be3cff 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2013-05-30 Paul Brook <paul@codesourcery.com> + + * mips.h (R_MIPS_EH): New. + 2013-05-28 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64.h (R_AARCH64_TLSDESC_LD64_PREL19): Rename to ... diff --git a/include/elf/mips.h b/include/elf/mips.h index 493bbfd..b5f7e1a 100644 --- a/include/elf/mips.h +++ b/include/elf/mips.h @@ -155,6 +155,7 @@ START_RELOC_NUMBERS (elf_mips_reloc_type) mips-linux for exception-handling data. GCC stopped using it in May, 2004, then started using it again for compact unwind tables. */ RELOC_NUMBER (R_MIPS_PC32, 248) + RELOC_NUMBER (R_MIPS_EH, 249) /* FIXME: this relocation is used internally by gas. */ RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250) /* These are GNU extensions to enable C++ vtable garbage collection. */ |