diff options
author | Catherine Moore <clm@redhat.com> | 2013-05-06 15:25:45 +0000 |
---|---|---|
committer | Catherine Moore <clm@redhat.com> | 2013-05-06 15:25:45 +0000 |
commit | b47468a6dbd1b54c44c2edc0f7db64a073d894ea (patch) | |
tree | 8b31843e0424b74b1fa02c4da140882b05c70bdc /bfd/elfn32-mips.c | |
parent | 2de39019a22364c903cc23f34e170ef7de4bed03 (diff) | |
download | gdb-b47468a6dbd1b54c44c2edc0f7db64a073d894ea.zip gdb-b47468a6dbd1b54c44c2edc0f7db64a073d894ea.tar.gz gdb-b47468a6dbd1b54c44c2edc0f7db64a073d894ea.tar.bz2 |
2013-05-06 Paul Brook <paul@codesourcery.com>
include/elf/
* mips.h (R_MIPS_PC32): Update comment.
* elf64-mips.c (elf_mips_gnu_pcrel32): New.
(bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
* elfn32-mips.c (elf_mips_gnu_pcrel32): New.
(bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.
2013-05-06 Paul Brook <paul@codesourcery.com>
Catherine Moore <clm@codesourcery.com>
gas/
* config/tc-mips.c (md_pcrel_from): Handle BFD_RELOC_32_PCREL.
(limited_pcrel_reloc_p): Likewise.
(md_apply_fix): Likewise.
(tc_gen_reloc): Likewise.
Diffstat (limited to 'bfd/elfn32-mips.c')
-rw-r--r-- | bfd/elfn32-mips.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 119f31b..131de33 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -2587,6 +2587,23 @@ static reloc_howto_type elf_mips_gnu_rela16_s2 = 0, /* src_mask */ 0x0000ffff, /* dst_mask */ TRUE); /* pcrel_offset */ + +/* 32 bit pc-relative. Used for compact EH tables. */ +static reloc_howto_type elf_mips_gnu_pcrel32 = + HOWTO (R_MIPS_PC32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + TRUE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + _bfd_mips_elf_generic_reloc, /* special_function */ + "R_MIPS_PC32", /* name */ + TRUE, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + TRUE); /* pcrel_offset */ + /* Originally a VxWorks extension, but now used for other systems too. */ static reloc_howto_type elf_mips_copy_howto = @@ -3073,6 +3090,8 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_vtinherit_howto; case BFD_RELOC_VTABLE_ENTRY: return &elf_mips_gnu_vtentry_howto; + case BFD_RELOC_32_PCREL: + return &elf_mips_gnu_pcrel32; case BFD_RELOC_MIPS_COPY: return &elf_mips_copy_howto; case BFD_RELOC_MIPS_JUMP_SLOT: @@ -3121,6 +3140,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_mips_gnu_rel16_s2; if (strcasecmp (elf_mips_gnu_rela16_s2.name, r_name) == 0) 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_copy_howto.name, r_name) == 0) return &elf_mips_copy_howto; if (strcasecmp (elf_mips_jump_slot_howto.name, r_name) == 0) @@ -3145,6 +3166,8 @@ mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p) return &elf_mips_gnu_rela16_s2; else return &elf_mips_gnu_rel16_s2; + case R_MIPS_PC32: + return &elf_mips_gnu_pcrel32; case R_MIPS_COPY: return &elf_mips_copy_howto; case R_MIPS_JUMP_SLOT: |