| /* MIPS-specific support for 64-bit ELF |
| Copyright (C) 1996-2024 Free Software Foundation, Inc. |
| Ian Lance Taylor, Cygnus Support |
| Linker support added by Mark Mitchell, CodeSourcery, LLC. |
| <mark@codesourcery.com> |
| |
| This file is part of BFD, the Binary File Descriptor library. |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
| the Free Software Foundation; either version 3 of the License, or |
| (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with this program; if not, write to the Free Software |
| Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| MA 02110-1301, USA. */ |
| |
| |
| /* This file supports the 64-bit MIPS ELF ABI. |
| |
| The MIPS 64-bit ELF ABI uses an unusual reloc format. This file |
| overrides the usual ELF reloc handling, and handles reading and |
| writing the relocations here. */ |
| |
| /* TODO: Many things are unsupported, even if there is some code for it |
| . (which was mostly stolen from elf32-mips.c and slightly adapted). |
| . |
| . - Relocation handling for REL relocs is wrong in many cases and |
| . generally untested. |
| . - Relocation handling for RELA relocs related to GOT support are |
| . also likely to be wrong. |
| . - Support for MIPS16 is untested. |
| . - Combined relocs with RSS_* entries are unsupported. |
| . - The whole GOT handling for NewABI is missing, some parts of |
| . the OldABI version is still lying around and should be removed. |
| */ |
| |
| #include "sysdep.h" |
| #include "bfd.h" |
| #include "libbfd.h" |
| #include "aout/ar.h" |
| #include "bfdlink.h" |
| #include "genlink.h" |
| #include "elf-bfd.h" |
| #include "elfxx-mips.h" |
| #include "elf/mips.h" |
| |
| /* Get the ECOFF swapping routines. The 64-bit ABI is not supposed to |
| use ECOFF. However, we support it anyhow for an easier changeover. */ |
| #include "coff/sym.h" |
| #include "coff/symconst.h" |
| #include "coff/internal.h" |
| #include "coff/ecoff.h" |
| /* The 64 bit versions of the mdebug data structures are in alpha.h. */ |
| #include "coff/alpha.h" |
| #define ECOFF_SIGNED_64 |
| #include "ecoffswap.h" |
| |
| static void mips_elf64_swap_reloc_in |
| (bfd *, const Elf64_Mips_External_Rel *, Elf64_Mips_Internal_Rela *); |
| static void mips_elf64_swap_reloca_in |
| (bfd *, const Elf64_Mips_External_Rela *, Elf64_Mips_Internal_Rela *); |
| static void mips_elf64_swap_reloc_out |
| (bfd *, const Elf64_Mips_Internal_Rela *, Elf64_Mips_External_Rel *); |
| static void mips_elf64_swap_reloca_out |
| (bfd *, const Elf64_Mips_Internal_Rela *, Elf64_Mips_External_Rela *); |
| static void mips_elf64_be_swap_reloc_in |
| (bfd *, const bfd_byte *, Elf_Internal_Rela *); |
| static void mips_elf64_be_swap_reloc_out |
| (bfd *, const Elf_Internal_Rela *, bfd_byte *); |
| static void mips_elf64_be_swap_reloca_in |
| (bfd *, const bfd_byte *, Elf_Internal_Rela *); |
| static void mips_elf64_be_swap_reloca_out |
| (bfd *, const Elf_Internal_Rela *, bfd_byte *); |
| static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup |
| (bfd *, bfd_reloc_code_real_type); |
| static bool mips_elf64_info_to_howto_rela |
| (bfd *, arelent *, Elf_Internal_Rela *); |
| static long mips_elf64_get_dynamic_reloc_upper_bound |
| (bfd *); |
| static bool mips_elf64_slurp_one_reloc_table |
| (bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type, arelent *, |
| asymbol **, bool); |
| static bool mips_elf64_slurp_reloc_table |
| (bfd *, asection *, asymbol **, bool); |
| static void mips_elf64_write_relocs |
| (bfd *, asection *, void *); |
| static void mips_elf64_write_rel |
| (bfd *, asection *, Elf_Internal_Shdr *, int *, void *); |
| static void mips_elf64_write_rela |
| (bfd *, asection *, Elf_Internal_Shdr *, int *, void *); |
| static bfd_reloc_status_type mips_elf64_gprel16_reloc |
| (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); |
| static bfd_reloc_status_type mips_elf64_literal_reloc |
| (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); |
| static bfd_reloc_status_type mips_elf64_gprel32_reloc |
| (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); |
| static bfd_reloc_status_type mips_elf64_shift6_reloc |
| (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); |
| static bfd_reloc_status_type mips16_gprel_reloc |
| (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); |
| static bool mips_elf64_assign_gp |
| (bfd *, bfd_vma *); |
| static bfd_reloc_status_type mips_elf64_final_gp |
| (bfd *, asymbol *, bool, char **, bfd_vma *); |
| static bool mips_elf64_object_p |
| (bfd *); |
| static irix_compat_t elf64_mips_irix_compat |
| (bfd *); |
| static bool elf64_mips_grok_prstatus |
| (bfd *, Elf_Internal_Note *); |
| static bool elf64_mips_grok_psinfo |
| (bfd *, Elf_Internal_Note *); |
| |
| extern const bfd_target mips_elf64_be_vec; |
| extern const bfd_target mips_elf64_le_vec; |
| |
| /* In case we're on a 32-bit machine, construct a 64-bit "-1" value |
| from smaller values. Start with zero, widen, *then* decrement. */ |
| #define MINUS_ONE (((bfd_vma)0) - 1) |
| |
| /* The number of local .got entries we reserve. */ |
| #define MIPS_RESERVED_GOTNO (2) |
| |
| /* The relocation table used for SHT_REL sections. */ |
| |
| static reloc_howto_type mips_elf64_howto_table_rel[] = |
| { |
| /* No relocation. */ |
| HOWTO (R_MIPS_NONE, /* type */ |
| 0, /* rightshift */ |
| 0, /* size */ |
| 0, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_NONE", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 16 bit relocation. */ |
| HOWTO (R_MIPS_16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit relocation. */ |
| HOWTO (R_MIPS_32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_32", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit symbol relative relocation. */ |
| HOWTO (R_MIPS_REL32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_REL32", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 26 bit jump address. */ |
| HOWTO (R_MIPS_26, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper 36 |
| bits must match the PC + 4. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_26", /* name */ |
| true, /* partial_inplace */ |
| 0x03ffffff, /* src_mask */ |
| 0x03ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL. |
| However, the native IRIX6 tools use them, so we try our best. */ |
| |
| /* High 16 bits of symbol value. */ |
| HOWTO (R_MIPS_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_hi16_reloc, /* special_function */ |
| "R_MIPS_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. */ |
| HOWTO (R_MIPS_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_lo16_reloc, /* special_function */ |
| "R_MIPS_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* GP relative reference. */ |
| HOWTO (R_MIPS_GPREL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips_elf64_gprel16_reloc, /* special_function */ |
| "R_MIPS_GPREL16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to literal section. */ |
| HOWTO (R_MIPS_LITERAL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips_elf64_literal_reloc, /* special_function */ |
| "R_MIPS_LITERAL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to global offset table. */ |
| HOWTO (R_MIPS_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_got16_reloc, /* special_function */ |
| "R_MIPS_GOT16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 16 bit PC relative reference. Note that the ABI document has a typo |
| and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. |
| We do the right thing here. */ |
| HOWTO (R_MIPS_PC16, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| /* 16 bit call through global offset table. */ |
| HOWTO (R_MIPS_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit GP relative reference. */ |
| HOWTO (R_MIPS_GPREL32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| mips_elf64_gprel32_reloc, /* special_function */ |
| "R_MIPS_GPREL32", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (13), |
| EMPTY_HOWTO (14), |
| EMPTY_HOWTO (15), |
| |
| /* A 5 bit shift field. */ |
| HOWTO (R_MIPS_SHIFT5, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 5, /* bitsize */ |
| false, /* pc_relative */ |
| 6, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SHIFT5", /* name */ |
| true, /* partial_inplace */ |
| 0x000007c0, /* src_mask */ |
| 0x000007c0, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A 6 bit shift field. */ |
| HOWTO (R_MIPS_SHIFT6, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 6, /* bitsize */ |
| false, /* pc_relative */ |
| 6, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| mips_elf64_shift6_reloc, /* special_function */ |
| "R_MIPS_SHIFT6", /* name */ |
| true, /* partial_inplace */ |
| 0x000007c4, /* src_mask */ |
| 0x000007c4, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit relocation. */ |
| HOWTO (R_MIPS_64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_64", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement in the global offset table. */ |
| HOWTO (R_MIPS_GOT_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_DISP", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement to page pointer in the global offset table. */ |
| HOWTO (R_MIPS_GOT_PAGE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_PAGE", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Offset from page pointer in the global offset table. */ |
| HOWTO (R_MIPS_GOT_OFST, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_OFST", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_GOT_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_GOT_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit subtraction. */ |
| HOWTO (R_MIPS_SUB, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SUB", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Insert the addend as an instruction. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_INSERT_A, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_INSERT_A", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Insert the addend as an instruction, and change all relocations |
| to refer to the old instruction at the address. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_INSERT_B, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_INSERT_B", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Delete a 32 bit instruction. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_DELETE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_DELETE", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations. |
| We don't, because |
| a) It means building the addend from a R_MIPS_HIGHEST/R_MIPS_HIGHER/ |
| R_MIPS_HI16/R_MIPS_LO16 sequence with varying ordering, using |
| fallable heuristics. |
| b) No other NewABI toolchain actually emits such relocations. */ |
| EMPTY_HOWTO (R_MIPS_HIGHER), |
| EMPTY_HOWTO (R_MIPS_HIGHEST), |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_CALL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_CALL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Section displacement, used by an associated event location section. */ |
| HOWTO (R_MIPS_SCN_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SCN_DISP", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_REL16, /* type */ |
| 0, /* rightshift */ |
| 2, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_REL16", /* name */ |
| true, /* partial_inplace */ |
| 0xffff, /* src_mask */ |
| 0xffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* These two are obsolete. */ |
| EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), |
| EMPTY_HOWTO (R_MIPS_PJUMP), |
| |
| /* Similiar to R_MIPS_REL32, but used for relocations in a GOT section. |
| It must be used for multigot GOT's (and only there). */ |
| HOWTO (R_MIPS_RELGOT, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_RELGOT", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Protected jump conversion. This is an optimization hint. No |
| relocation is required for correctness. */ |
| HOWTO (R_MIPS_JALR, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_JALR", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x00000000, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS relocations. */ |
| EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32), |
| EMPTY_HOWTO (R_MIPS_TLS_DTPREL32), |
| |
| HOWTO (R_MIPS_TLS_DTPMOD64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPMOD64", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_TLS_DTPREL64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL64", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS general dynamic variable reference. */ |
| HOWTO (R_MIPS_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_GD", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic variable reference. */ |
| HOWTO (R_MIPS_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_LDM", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_GOTTPREL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS IE dynamic relocations. */ |
| EMPTY_HOWTO (R_MIPS_TLS_TPREL32), |
| |
| HOWTO (R_MIPS_TLS_TPREL64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL64", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit relocation with no addend. */ |
| HOWTO (R_MIPS_GLOB_DAT, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GLOB_DAT", /* name */ |
| false, /* partial_inplace */ |
| 0x0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (52), |
| EMPTY_HOWTO (53), |
| EMPTY_HOWTO (54), |
| EMPTY_HOWTO (55), |
| EMPTY_HOWTO (56), |
| EMPTY_HOWTO (57), |
| EMPTY_HOWTO (58), |
| EMPTY_HOWTO (59), |
| |
| HOWTO (R_MIPS_PC21_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 21, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC21_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x001fffff, /* src_mask */ |
| 0x001fffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC26_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC26_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x03ffffff, /* src_mask */ |
| 0x03ffffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC18_S3, /* type */ |
| 3, /* rightshift */ |
| 4, /* size */ |
| 18, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC18_S3", /* name */ |
| true, /* partial_inplace */ |
| 0x0003ffff, /* src_mask */ |
| 0x0003ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC19_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 19, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC19_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x0007ffff, /* src_mask */ |
| 0x0007ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PCHI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PCHI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PCLO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PCLO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| }; |
| |
| /* The relocation table used for SHT_RELA sections. */ |
| |
| static reloc_howto_type mips_elf64_howto_table_rela[] = |
| { |
| /* No relocation. */ |
| HOWTO (R_MIPS_NONE, /* type */ |
| 0, /* rightshift */ |
| 0, /* size */ |
| 0, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_NONE", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 16 bit relocation. */ |
| HOWTO (R_MIPS_16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit relocation. */ |
| HOWTO (R_MIPS_32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_32", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit symbol relative relocation. */ |
| HOWTO (R_MIPS_REL32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_REL32", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 26 bit jump address. */ |
| HOWTO (R_MIPS_26, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper 36 |
| bits must match the PC + 4. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_26", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x03ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of symbol value. */ |
| HOWTO (R_MIPS_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. */ |
| HOWTO (R_MIPS_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* GP relative reference. */ |
| HOWTO (R_MIPS_GPREL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips_elf64_gprel16_reloc, /* special_function */ |
| "R_MIPS_GPREL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to literal section. */ |
| HOWTO (R_MIPS_LITERAL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips_elf64_literal_reloc, /* special_function */ |
| "R_MIPS_LITERAL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to global offset table. */ |
| HOWTO (R_MIPS_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 16 bit PC relative reference. Note that the ABI document has a typo |
| and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. |
| We do the right thing here. */ |
| HOWTO (R_MIPS_PC16, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| /* 16 bit call through global offset table. */ |
| HOWTO (R_MIPS_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit GP relative reference. */ |
| HOWTO (R_MIPS_GPREL32, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| mips_elf64_gprel32_reloc, /* special_function */ |
| "R_MIPS_GPREL32", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (13), |
| EMPTY_HOWTO (14), |
| EMPTY_HOWTO (15), |
| |
| /* A 5 bit shift field. */ |
| HOWTO (R_MIPS_SHIFT5, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 5, /* bitsize */ |
| false, /* pc_relative */ |
| 6, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SHIFT5", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x000007c0, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A 6 bit shift field. */ |
| HOWTO (R_MIPS_SHIFT6, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 6, /* bitsize */ |
| false, /* pc_relative */ |
| 6, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| mips_elf64_shift6_reloc, /* special_function */ |
| "R_MIPS_SHIFT6", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x000007c4, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit relocation. */ |
| HOWTO (R_MIPS_64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_64", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement in the global offset table. */ |
| HOWTO (R_MIPS_GOT_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_DISP", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement to page pointer in the global offset table. */ |
| HOWTO (R_MIPS_GOT_PAGE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_PAGE", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Offset from page pointer in the global offset table. */ |
| HOWTO (R_MIPS_GOT_OFST, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_OFST", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_GOT_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_GOT_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GOT_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit subtraction. */ |
| HOWTO (R_MIPS_SUB, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SUB", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Insert the addend as an instruction. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_INSERT_A, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_INSERT_A", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Insert the addend as an instruction, and change all relocations |
| to refer to the old instruction at the address. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_INSERT_B, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_INSERT_B", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Delete a 32 bit instruction. */ |
| /* FIXME: Not handled correctly. */ |
| HOWTO (R_MIPS_DELETE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_DELETE", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Get the higher value of a 64 bit addend. */ |
| HOWTO (R_MIPS_HIGHER, /* type */ |
| 32, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_HIGHER", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Get the highest value of a 64 bit addend. */ |
| HOWTO (R_MIPS_HIGHEST, /* type */ |
| 48, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_HIGHEST", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_CALL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MIPS_CALL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_CALL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Section displacement, used by an associated event location section. */ |
| HOWTO (R_MIPS_SCN_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_SCN_DISP", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_REL16, /* type */ |
| 0, /* rightshift */ |
| 2, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_REL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* These two are obsolete. */ |
| EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), |
| EMPTY_HOWTO (R_MIPS_PJUMP), |
| |
| /* Similiar to R_MIPS_REL32, but used for relocations in a GOT section. |
| It must be used for multigot GOT's (and only there). */ |
| HOWTO (R_MIPS_RELGOT, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_RELGOT", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Protected jump conversion. This is an optimization hint. No |
| relocation is required for correctness. */ |
| HOWTO (R_MIPS_JALR, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_JALR", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x00000000, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS relocations. */ |
| EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32), |
| EMPTY_HOWTO (R_MIPS_TLS_DTPREL32), |
| |
| HOWTO (R_MIPS_TLS_DTPMOD64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPMOD64", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_TLS_DTPREL64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL64", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS general dynamic variable reference. */ |
| HOWTO (R_MIPS_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_GD", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic variable reference. */ |
| HOWTO (R_MIPS_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_LDM", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_DTPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_GOTTPREL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS IE dynamic relocations. */ |
| EMPTY_HOWTO (R_MIPS_TLS_TPREL32), |
| |
| HOWTO (R_MIPS_TLS_TPREL64, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL64", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_TLS_TPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 32 bit relocation with no addend. */ |
| HOWTO (R_MIPS_GLOB_DAT, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GLOB_DAT", /* name */ |
| false, /* partial_inplace */ |
| 0x0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (52), |
| EMPTY_HOWTO (53), |
| EMPTY_HOWTO (54), |
| EMPTY_HOWTO (55), |
| EMPTY_HOWTO (56), |
| EMPTY_HOWTO (57), |
| EMPTY_HOWTO (58), |
| EMPTY_HOWTO (59), |
| |
| HOWTO (R_MIPS_PC21_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 21, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC21_S2", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x001fffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC26_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC26_S2", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x03ffffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC18_S3, /* type */ |
| 3, /* rightshift */ |
| 4, /* size */ |
| 18, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC18_S3", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0003ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PC19_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 19, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PC19_S2", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0007ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PCHI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PCHI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MIPS_PCLO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_PCLO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| }; |
| |
| static reloc_howto_type mips16_elf64_howto_table_rel[] = |
| { |
| /* The reloc used for the mips16 jump instruction. */ |
| HOWTO (R_MIPS16_26, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper four |
| bits must match the PC. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_26", /* name */ |
| true, /* partial_inplace */ |
| 0x3ffffff, /* src_mask */ |
| 0x3ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* The reloc used for the mips16 gprel instruction. */ |
| HOWTO (R_MIPS16_GPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips16_gprel_reloc, /* special_function */ |
| "R_MIPS16_GPREL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A MIPS16 reference to the global offset table. */ |
| HOWTO (R_MIPS16_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_got16_reloc, /* special_function */ |
| "R_MIPS16_GOT16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A MIPS16 call through the global offset table. */ |
| HOWTO (R_MIPS16_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_CALL16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 high 16 bits of symbol value. */ |
| HOWTO (R_MIPS16_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_hi16_reloc, /* special_function */ |
| "R_MIPS16_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 low 16 bits of symbol value. */ |
| HOWTO (R_MIPS16_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_lo16_reloc, /* special_function */ |
| "R_MIPS16_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS general dynamic variable reference. */ |
| HOWTO (R_MIPS16_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_GD", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic variable reference. */ |
| HOWTO (R_MIPS16_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_LDM", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic offset. */ |
| HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_DTPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic offset. */ |
| HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_DTPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_GOTTPREL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_TPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_TPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 16-bit PC-relative branch offset. */ |
| HOWTO (R_MIPS16_PC16_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_PC16_S1", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| }; |
| |
| static reloc_howto_type mips16_elf64_howto_table_rela[] = |
| { |
| /* The reloc used for the mips16 jump instruction. */ |
| HOWTO (R_MIPS16_26, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper four |
| bits must match the PC. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_26", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x3ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* The reloc used for the mips16 gprel instruction. */ |
| HOWTO (R_MIPS16_GPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| mips16_gprel_reloc, /* special_function */ |
| "R_MIPS16_GPREL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A MIPS16 reference to the global offset table. */ |
| HOWTO (R_MIPS16_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_got16_reloc, /* special_function */ |
| "R_MIPS16_GOT16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* A MIPS16 call through the global offset table. */ |
| HOWTO (R_MIPS16_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_CALL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 high 16 bits of symbol value. */ |
| HOWTO (R_MIPS16_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_hi16_reloc, /* special_function */ |
| "R_MIPS16_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 low 16 bits of symbol value. */ |
| HOWTO (R_MIPS16_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_lo16_reloc, /* special_function */ |
| "R_MIPS16_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS general dynamic variable reference. */ |
| HOWTO (R_MIPS16_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_GD", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic variable reference. */ |
| HOWTO (R_MIPS16_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_LDM", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic offset. */ |
| HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_DTPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS local dynamic offset. */ |
| HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_DTPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_GOTTPREL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_TPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 TLS thread pointer offset. */ |
| HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_TLS_TPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* MIPS16 16-bit PC-relative branch offset. */ |
| HOWTO (R_MIPS16_PC16_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS16_PC16_S1", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| }; |
| |
| static reloc_howto_type micromips_elf64_howto_table_rel[] = |
| { |
| EMPTY_HOWTO (130), |
| EMPTY_HOWTO (131), |
| EMPTY_HOWTO (132), |
| |
| /* 26 bit jump address. */ |
| HOWTO (R_MICROMIPS_26_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper four |
| bits must match the PC. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_26_S1", /* name */ |
| true, /* partial_inplace */ |
| 0x3ffffff, /* src_mask */ |
| 0x3ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of symbol value. */ |
| HOWTO (R_MICROMIPS_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_hi16_reloc, /* special_function */ |
| "R_MICROMIPS_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. */ |
| HOWTO (R_MICROMIPS_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_lo16_reloc, /* special_function */ |
| "R_MICROMIPS_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* GP relative reference. */ |
| HOWTO (R_MICROMIPS_GPREL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_GPREL16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to literal section. */ |
| HOWTO (R_MICROMIPS_LITERAL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_LITERAL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to global offset table. */ |
| HOWTO (R_MICROMIPS_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_got16_reloc, /* special_function */ |
| "R_MICROMIPS_GOT16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* This is for microMIPS branches. */ |
| HOWTO (R_MICROMIPS_PC7_S1, /* type */ |
| 1, /* rightshift */ |
| 2, /* size */ |
| 7, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC7_S1", /* name */ |
| true, /* partial_inplace */ |
| 0x0000007f, /* src_mask */ |
| 0x0000007f, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC10_S1, /* type */ |
| 1, /* rightshift */ |
| 2, /* size */ |
| 10, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC10_S1", /* name */ |
| true, /* partial_inplace */ |
| 0x000003ff, /* src_mask */ |
| 0x000003ff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC16_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC16_S1", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| /* 16 bit call through global offset table. */ |
| HOWTO (R_MICROMIPS_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (143), |
| EMPTY_HOWTO (144), |
| |
| /* Displacement in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_DISP",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement to page pointer in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_PAGE",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Offset from page pointer in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_OFST, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_OFST",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_HI16",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_LO16",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit subtraction. Used in the N32 ABI. */ |
| HOWTO (R_MICROMIPS_SUB, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_SUB", /* name */ |
| true, /* partial_inplace */ |
| MINUS_ONE, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* We don't support these for REL relocations, because it means building |
| the addend from a R_MICROMIPS_HIGHEST/R_MICROMIPS_HIGHER/ |
| R_MICROMIPS_HI16/R_MICROMIPS_LO16 sequence with varying ordering, |
| using fallable heuristics. */ |
| EMPTY_HOWTO (R_MICROMIPS_HIGHER), |
| EMPTY_HOWTO (R_MICROMIPS_HIGHEST), |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_CALL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL_HI16",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_CALL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL_LO16",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Section displacement. */ |
| HOWTO (R_MICROMIPS_SCN_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_SCN_DISP", /* name */ |
| true, /* partial_inplace */ |
| 0xffffffff, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Protected jump conversion. This is an optimization hint. No |
| relocation is required for correctness. */ |
| HOWTO (R_MICROMIPS_JALR, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_JALR", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x00000000, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values |
| must be zero. This is used for relaxation. */ |
| HOWTO (R_MICROMIPS_HI0_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_HI0_LO16",/* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (158), |
| EMPTY_HOWTO (159), |
| EMPTY_HOWTO (160), |
| EMPTY_HOWTO (161), |
| |
| /* TLS general dynamic variable reference. */ |
| HOWTO (R_MICROMIPS_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_GD", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic variable reference. */ |
| HOWTO (R_MICROMIPS_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_LDM", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_GOTTPREL", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (167), |
| EMPTY_HOWTO (168), |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_TPREL_HI16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_TPREL_LO16", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (171), |
| |
| /* GP- and PC-relative relocations. */ |
| HOWTO (R_MICROMIPS_GPREL7_S2, /* type */ |
| 2, /* rightshift */ |
| 2, /* size */ |
| 7, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_GPREL7_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x0000007f, /* src_mask */ |
| 0x0000007f, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC23_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 23, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC23_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x007fffff, /* src_mask */ |
| 0x007fffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| }; |
| |
| static reloc_howto_type micromips_elf64_howto_table_rela[] = |
| { |
| EMPTY_HOWTO (130), |
| EMPTY_HOWTO (131), |
| EMPTY_HOWTO (132), |
| |
| /* 26 bit jump address. */ |
| HOWTO (R_MICROMIPS_26_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 26, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| /* This needs complex overflow |
| detection, because the upper four |
| bits must match the PC. */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_26_S1", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x3ffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of symbol value. */ |
| HOWTO (R_MICROMIPS_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_hi16_reloc, /* special_function */ |
| "R_MICROMIPS_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. */ |
| HOWTO (R_MICROMIPS_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_lo16_reloc, /* special_function */ |
| "R_MICROMIPS_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* GP relative reference. */ |
| HOWTO (R_MICROMIPS_GPREL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_GPREL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to literal section. */ |
| HOWTO (R_MICROMIPS_LITERAL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_LITERAL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Reference to global offset table. */ |
| HOWTO (R_MICROMIPS_GOT16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_got16_reloc, /* special_function */ |
| "R_MICROMIPS_GOT16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* This is for microMIPS branches. */ |
| HOWTO (R_MICROMIPS_PC7_S1, /* type */ |
| 1, /* rightshift */ |
| 2, /* size */ |
| 7, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC7_S1", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000007f, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC10_S1, /* type */ |
| 1, /* rightshift */ |
| 2, /* size */ |
| 10, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC10_S1", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x000003ff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC16_S1, /* type */ |
| 1, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC16_S1", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| |
| /* 16 bit call through global offset table. */ |
| HOWTO (R_MICROMIPS_CALL16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (143), |
| EMPTY_HOWTO (144), |
| |
| /* Displacement in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_DISP",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Displacement to page pointer in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_PAGE",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Offset from page pointer in the global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_OFST, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_OFST",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_HI16",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_GOT_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_GOT_LO16",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* 64 bit subtraction. Used in the N32 ABI. */ |
| HOWTO (R_MICROMIPS_SUB, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_SUB", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| MINUS_ONE, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Get the higher value of a 64 bit addend. */ |
| HOWTO (R_MICROMIPS_HIGHER, /* type */ |
| 32, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_HIGHER", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Get the highest value of a 64 bit addend. */ |
| HOWTO (R_MICROMIPS_HIGHEST, /* type */ |
| 48, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_HIGHEST", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* High 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_CALL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL_HI16",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of displacement in global offset table. */ |
| HOWTO (R_MICROMIPS_CALL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_CALL_LO16",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Section displacement. */ |
| HOWTO (R_MICROMIPS_SCN_DISP, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_SCN_DISP", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0xffffffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Protected jump conversion. This is an optimization hint. No |
| relocation is required for correctness. */ |
| HOWTO (R_MICROMIPS_JALR, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_JALR", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x00000000, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values |
| must be zero. This is used for relaxation. */ |
| HOWTO (R_MICROMIPS_HI0_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_HI0_LO16",/* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (158), |
| EMPTY_HOWTO (159), |
| EMPTY_HOWTO (160), |
| EMPTY_HOWTO (161), |
| |
| /* TLS general dynamic variable reference. */ |
| HOWTO (R_MICROMIPS_TLS_GD, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_GD", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic variable reference. */ |
| HOWTO (R_MICROMIPS_TLS_LDM, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_LDM", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS local dynamic offset. */ |
| HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_GOTTPREL", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (167), |
| EMPTY_HOWTO (168), |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_TPREL_HI16, /* type */ |
| 16, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_TPREL_HI16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| /* TLS thread pointer offset. */ |
| HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_TLS_TPREL_LO16", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| EMPTY_HOWTO (171), |
| |
| /* GP- and PC-relative relocations. */ |
| HOWTO (R_MICROMIPS_GPREL7_S2, /* type */ |
| 2, /* rightshift */ |
| 2, /* size */ |
| 7, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf32_gprel16_reloc, /* special_function */ |
| "R_MICROMIPS_GPREL7_S2", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x0000007f, /* dst_mask */ |
| false), /* pcrel_offset */ |
| |
| HOWTO (R_MICROMIPS_PC23_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 23, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MICROMIPS_PC23_S2", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0x007fffff, /* dst_mask */ |
| true), /* pcrel_offset */ |
| }; |
| |
| /* GNU extension to record C++ vtable hierarchy */ |
| static reloc_howto_type elf_mips_gnu_vtinherit_howto = |
| HOWTO (R_MIPS_GNU_VTINHERIT, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 0, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| NULL, /* special_function */ |
| "R_MIPS_GNU_VTINHERIT", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0, /* dst_mask */ |
| false); /* pcrel_offset */ |
| |
| /* GNU extension to record C++ vtable member usage */ |
| static reloc_howto_type elf_mips_gnu_vtentry_howto = |
| HOWTO (R_MIPS_GNU_VTENTRY, /* type */ |
| 0, /* rightshift */ |
| 4, /* size */ |
| 0, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_dont, /* complain_on_overflow */ |
| _bfd_elf_rel_vtable_reloc_fn, /* special_function */ |
| "R_MIPS_GNU_VTENTRY", /* name */ |
| false, /* partial_inplace */ |
| 0, /* src_mask */ |
| 0, /* dst_mask */ |
| false); /* pcrel_offset */ |
| |
| /* 16 bit offset for pc-relative branches. */ |
| static reloc_howto_type elf_mips_gnu_rel16_s2 = |
| HOWTO (R_MIPS_GNU_REL16_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GNU_REL16_S2", /* name */ |
| true, /* partial_inplace */ |
| 0x0000ffff, /* src_mask */ |
| 0x0000ffff, /* dst_mask */ |
| true); /* pcrel_offset */ |
| |
| /* 16 bit offset for pc-relative branches. */ |
| static reloc_howto_type elf_mips_gnu_rela16_s2 = |
| HOWTO (R_MIPS_GNU_REL16_S2, /* type */ |
| 2, /* rightshift */ |
| 4, /* size */ |
| 16, /* bitsize */ |
| true, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_GNU_REL16_S2", /* name */ |
| false, /* partial_inplace */ |
| 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 */ |
| 4, /* size */ |
| 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 = |
| HOWTO (R_MIPS_COPY, /* type */ |
| 0, /* rightshift */ |
| 0, /* this one is variable size */ |
| 0, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_COPY", /* name */ |
| false, /* partial_inplace */ |
| 0x0, /* src_mask */ |
| 0x0, /* dst_mask */ |
| false); /* pcrel_offset */ |
| |
| /* Originally a VxWorks extension, but now used for other systems too. */ |
| static reloc_howto_type elf_mips_jump_slot_howto = |
| HOWTO (R_MIPS_JUMP_SLOT, /* type */ |
| 0, /* rightshift */ |
| 8, /* size */ |
| 64, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_bitfield, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_JUMP_SLOT", /* name */ |
| false, /* partial_inplace */ |
| 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 */ |
| 4, /* size */ |
| 32, /* bitsize */ |
| false, /* pc_relative */ |
| 0, /* bitpos */ |
| complain_overflow_signed, /* complain_on_overflow */ |
| _bfd_mips_elf_generic_reloc, /* special_function */ |
| "R_MIPS_EH", /* name */ |
|