asymbol *symbol, PTR data, asection *input_section, bfd *output_bfd, char **error_message)); static reloc_howto_type elf_d30v_howto_table[] = { /* This reloc does nothing. */ HOWTO (R_D30V_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_D30V_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 6 bit absolute relocation */ HOWTO (R_D30V_6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
/* The Motorola 68HC11 microcontroller only addresses 64Kb but we also support a memory bank switching mechanism similar to 68HC12. We must handle 8 and 16-bit relocations. The 32-bit relocation are used for debugging sections (DWARF2) to represent a virtual address. The 3-bit and 16-bit PC rel relocation is only used by 68HC12. */ static reloc_howto_type elf_m68hc11_howto_table[] = { /* This reloc does nothing. */ HOWTO (R_M68HC11_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 8 bit absolute relocation */ HOWTO (R_M68HC11_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
#include "libbfd.h" #include "obstack.h" #include "coff/we32k.h" #include "coff/internal.h" #include "libcoff.h" static reloc_howto_type howto_table[] = { {0}, {1}, {2}, {3}, {4}, {5}, HOWTO(R_DIR32, 0, 2, 32, false, 0,complain_overflow_bitfield, 0, "dir32", true, 0xffffffff,0xffffffff, false), {7}, {010}, {011}, {012}, {013}, {014}, {015}, {016}, HOWTO(R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true, 0x000000ff,0x000000ff, false), HOWTO(R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true, 0xffffffff,0xffffffff, false), HOWTO(R_PCRBYTE, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true, 0x000000ff,0x000000ff, false), HOWTO(R_PCRWORD, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_PCRLONG, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true, 0xffffffff,0xffffffff, false), };
R_SPARC_WDISP30, R_SPARC_WDISP22, R_SPARC_HI22, R_SPARC_22, R_SPARC_13, R_SPARC_LO10, R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22, R_SPARC_PC10, R_SPARC_PC22, R_SPARC_WPLT30, R_SPARC_COPY, R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT, R_SPARC_RELATIVE, R_SPARC_UA32, R_SPARC_max }; static reloc_howto_type nlm32_sparc_howto_table[] = { HOWTO (R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, 0,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE), HOWTO (R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_8", FALSE,0,0x000000ff,TRUE), HOWTO (R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_16", FALSE,0,0x0000ffff,TRUE), HOWTO (R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_32", FALSE,0,0xffffffff,TRUE), HOWTO (R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, 0,"R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE), HOWTO (R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, 0,"R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE), HOWTO (R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, 0,"R_SPARC_DISP32", FALSE,0,0x00ffffff,TRUE), HOWTO (R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, 0,"R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE), HOWTO (R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, 0,"R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE), HOWTO (R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, 0,"R_SPARC_HI22", FALSE,0,0x003fffff,TRUE), HOWTO (R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_22", FALSE,0,0x003fffff,TRUE), HOWTO (R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_13", FALSE,0,0x00001fff,TRUE), HOWTO (R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, 0,"R_SPARC_LO10", FALSE,0,0x000003ff,TRUE), HOWTO (R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE), HOWTO (R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE), HOWTO (R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
#include "libbfd.h" #include "elf-bfd.h" #include "elf/moxie.h" /* Forward declarations. */ static reloc_howto_type moxie_elf_howto_table [] = { /* This reloc does nothing. */ HOWTO (R_MOXIE_NONE, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MOXIE_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_MOXIE_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
#include "elf-bfd.h" #include "elf/eco32.h" /* * see bfd-in2.h line ~ 2246 * docu is there */ static reloc_howto_type eco32_elf_howto_table[] = { HOWTO (R_ECO32_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ECO32_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* write full 32 bit word with value => full word change */ HOWTO (R_ECO32_W32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */
fr30_elf_i20_reloc (bfd *, arelent *, asymbol *, void * data, asection *, bfd *, char **error_message); static bfd_reloc_status_type fr30_elf_i32_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type fr30_elf_howto_table [] = { /* This reloc does nothing. */ HOWTO (R_FR30_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_FR30_8, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ FALSE, /* pc_relative */ 4, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
#include "ecoffswap.h" /* How to process the various relocs types. */ static reloc_howto_type mips_howto_table[] = { /* Reloc type 0 is ignored. The reloc reading code ensures that this is a reference to the .abs section, which will cause bfd_perform_relocation to do nothing. */ HOWTO (MIPS_R_IGNORE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "IGNORE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 16 bit reference to a symbol, normally from a data section. */ HOWTO (MIPS_R_REFHALF, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
} } break; } } } #define R_RELWORD 1 #define R_RELLONG 2 #define R_RELWORD_NEG 3 #define R_RELLONG_NEG 4 reloc_howto_type versados_howto_table[] = { HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_dont, 0, "+v16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_dont, 0, "+v32", TRUE, 0xffffffff, 0xffffffff, FALSE), HOWTO (R_RELWORD_NEG, 0, -1, 16, FALSE, 0, complain_overflow_dont, 0, "-v16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO (R_RELLONG_NEG, 0, -2, 32, FALSE, 0, complain_overflow_dont, 0, "-v32", TRUE, 0xffffffff, 0xffffffff, FALSE), }; static int get_offset (int len, unsigned char *ptr)
static bfd_boolean mcore_elf_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); static reloc_howto_type * mcore_elf_howto_table [(int) R_MCORE_max]; static reloc_howto_type mcore_elf_howto_raw[] = { /* This reloc does nothing. */ HOWTO (R_MCORE_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "R_MCORE_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A standard 32 bit relocation. */ HOWTO (R_MCORE_ADDR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); static asection * xstormy16_elf_gc_mark_hook PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); static reloc_howto_type xstormy16_elf_howto_table [] = { /* This reloc does nothing. */ HOWTO (R_XSTORMY16_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_XSTORMY16_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bfd.h" #include "sysdep.h" #include "obstack.h" #include "libbfd.h" #include "bfdlink.h" #include "coff/z8k.h" #include "coff/internal.h" #include "libcoff.h" #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1) static reloc_howto_type r_imm32 = HOWTO (R_IMM32, 0, 1, 32, false, 0, complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff, 0xffffffff, false); static reloc_howto_type r_imm4l = HOWTO (R_IMM4L, 0, 1, 4, false, 0, complain_overflow_bitfield, 0, "r_imm4l", true, 0xf, 0xf, false); static reloc_howto_type r_da = HOWTO (R_IMM16, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "r_da", true, 0x0000ffff, 0x0000ffff, false); static reloc_howto_type r_imm8 = HOWTO (R_IMM8, 0, 1, 8, false, 0, complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff, false);
#include "sysdep.h" #include "libbfd.h" #include "bfdlink.h" #include "coff/h8500.h" #include "coff/internal.h" #include "libcoff.h" static int coff_h8500_select_reloc PARAMS ((reloc_howto_type *)); static void rtype2howto PARAMS ((arelent *, struct internal_reloc *)); static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *)); static void extra_case PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, bfd_byte *, unsigned int *, unsigned int *)); #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1) static reloc_howto_type r_imm8 = HOWTO (R_H8500_IMM8, 0, 1, 8, FALSE, 0, complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff, FALSE); static reloc_howto_type r_imm16 = HOWTO (R_H8500_IMM16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "r_imm16", TRUE, 0x0000ffff, 0x0000ffff, FALSE); static reloc_howto_type r_imm24 = HOWTO (R_H8500_IMM24, 0, 1, 24, FALSE, 0, complain_overflow_bitfield, 0, "r_imm24", TRUE, 0x00ffffff, 0x00ffffff, FALSE); static reloc_howto_type r_imm32 = HOWTO (R_H8500_IMM32, 0, 1, 32, FALSE, 0, complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff, 0xffffffff, FALSE); static reloc_howto_type r_high8 = HOWTO (R_H8500_HIGH8, 0, 1, 8, FALSE, 0,
R_MN10200_24, R_MN10200_PCREL8, R_MN10200_PCREL16, R_MN10200_PCREL24, R_MN10200_MAX }; static reloc_howto_type elf_mn10200_howto_table[] = { /* Dummy relocation. Does nothing. */ HOWTO (R_MN10200_NONE, 0, 2, 16, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_NONE", FALSE, 0, 0, FALSE), /* Standard 32 bit reloc. */ HOWTO (R_MN10200_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc,
#include "elf-bfd.h" #include "elf/d10v.h" /* Use REL instead of RELA to save space. */ #define USE_REL 1 static reloc_howto_type elf_d10v_howto_table[] = { /* This reloc does nothing. */ HOWTO (R_D10V_NONE, /* Type. */ 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_NONE", /* Name. */ FALSE, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ FALSE), /* PCrel_offset. */ /* An PC Relative 10-bit relocation, shifted by 2, right container. */ HOWTO (R_D10V_10_PCREL_R, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ TRUE, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */
PARAMS ((bfd *abfd, Elf_Internal_Note *note)); /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO in that slot. */ static reloc_howto_type elf32_arm_howto_table[] = { /* No relocation */ HOWTO (R_ARM_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ HOWTO (R_ARM_PC24, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */
static struct bfd_link_hash_table* xgate_elf_bfd_link_hash_table_create (bfd *); /* Use REL instead of RELA to save space */ #define USE_REL 1 static reloc_howto_type elf_xgate_howto_table[] = { /* This reloc does nothing. */ HOWTO (R_XGATE_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 8 bit absolute relocation. */ HOWTO (R_XGATE_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
mdata->header.cputype = BFD_MACH_O_CPU_TYPE_X86_64; mdata->header.cpusubtype = BFD_MACH_O_CPU_SUBTYPE_X86_ALL; mdata->header.byteorder = BFD_ENDIAN_LITTLE; mdata->header.version = 2; return TRUE; } /* In case we are on a 32-bit machine, construct a 64-bit "-1" value. */ #define MINUS_ONE (~ (bfd_vma) 0) static reloc_howto_type x86_64_howto_table[]= { /* 0 */ HOWTO(BFD_RELOC_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, NULL, "64", FALSE, MINUS_ONE, MINUS_ONE, FALSE), HOWTO(BFD_RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, NULL, "32", FALSE, 0xffffffff, 0xffffffff, FALSE), HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, NULL, "DISP32", FALSE, 0xffffffff, 0xffffffff, TRUE), HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_1, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, NULL, "DISP32_1", FALSE, 0xffffffff, 0xffffffff, TRUE), /* 4 */ HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_2, 0, 2, 32, TRUE, 0,
#include "sysdep.h" #include "libbfd.h" #include "elf-bfd.h" #include "elf/openrisc.h" #include "libiberty.h" static reloc_howto_type openrisc_elf_howto_table[] = { /* This reloc does nothing. */ HOWTO (R_OPENRISC_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OPENRISC_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A PC relative 26 bit relocation, right shifted by 2. */ HOWTO (R_OPENRISC_INSN_REL_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */
#include "sysdep.h" #include "bfd.h" #include "libbfd.h" #include "coff/apollo.h" #include "coff/internal.h" #include "libcoff.h" #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3) #ifdef ONLY_DECLARE_RELOCS extern reloc_howto_type apollocoff_howto_table[]; #else reloc_howto_type apollocoff_howto_table[] = { HOWTO (R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE, 0x000000ff,0x000000ff, FALSE), HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE, 0x0000ffff,0x0000ffff, FALSE), HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE, 0xffffffff,0xffffffff, FALSE), HOWTO (R_PCRBYTE, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE, 0x000000ff,0x000000ff, FALSE), HOWTO (R_PCRWORD, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE), HOWTO (R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE, 0xffffffff,0xffffffff, FALSE), HOWTO (R_RELLONG_NEG, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "-32", TRUE, 0xffffffff,0xffffffff, FALSE), }; #endif /* not ONLY_DECLARE_RELOCS */ #ifndef BADMAG #define BADMAG(x) M68KBADMAG(x) #endif #define APOLLO_M68 1 /* Customize coffcode.h */ /* Turn a howto into a reloc number. */
#include "libbfd.h" #include "elf-bfd.h" #include "elf/msp430.h" /* Use RELA instead of REL. */ #undef USE_REL static reloc_howto_type elf_msp430_howto_table[] = { HOWTO (R_MSP430_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ HOWTO (R_MSP430_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */
static bfd_reloc_status_type elf32_i960_relocate PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static reloc_howto_type *elf32_i960_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); #define USE_REL 1 #define bfd_elf32_bfd_reloc_type_lookup elf32_i960_reloc_type_lookup #define elf_info_to_howto elf32_i960_info_to_howto #define elf_info_to_howto_rel elf32_i960_info_to_howto_rel static reloc_howto_type elf_howto_table[]= { HOWTO(R_960_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield, elf32_i960_relocate, "R_960_NONE", true, 0x00000000, 0x00000000, false), EMPTY_HOWTO (1), HOWTO (R_960_32, 0, 2, 32, false, 0, complain_overflow_bitfield, elf32_i960_relocate, "R_960_32", true, 0xffffffff, 0xffffffff, false), HOWTO (R_960_IP24, 0, 2, 24, true, 0, complain_overflow_signed, elf32_i960_relocate, "R_960_IP24 ", true, 0x00ffffff, 0x00ffffff, false), EMPTY_HOWTO (4), EMPTY_HOWTO (5), EMPTY_HOWTO (6), EMPTY_HOWTO (7) }; static enum elf_i960_reloc_type
R_MN10200_PCREL8, R_MN10200_PCREL16, R_MN10200_PCREL24, R_MN10200_MAX }; static reloc_howto_type elf_mn10200_howto_table[] = { /* Dummy relocation. Does nothing. */ HOWTO (R_MN10200_NONE, 0, 2, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_NONE", false, 0, 0, false), /* Standard 32 bit reloc. */ HOWTO (R_MN10200_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc,
static bfd_boolean mt_elf_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); /* Relocation tables. */ static reloc_howto_type mt_elf_howto_table [] = { /* This reloc does nothing. */ HOWTO (R_MT_NONE, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_NONE", /* name */ FALSE, /* partial_inplace */ 0 , /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_MT_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */
/* Forward declarations. */ static bfd_reloc_status_type iq2000_elf_howto_hi16_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type iq2000_elf_howto_table [] = { /* This reloc does nothing. */ HOWTO (R_IQ2000_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_IQ2000_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
#include "libbfd.h" #include "elf-bfd.h" #include "elf/i370.h" static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ]; static reloc_howto_type i370_elf_howto_raw[] = { /* This reloc does nothing. */ HOWTO (R_I370_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_I370_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* A standard 31 bit relocation. */ HOWTO (R_I370_ADDR31, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 31, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */
Elf_Internal_Sym *, asection **); static bfd_reloc_status_type special (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **); /* This does not include any relocation information, but should be good enough for GDB or objdump to read the file. */ static reloc_howto_type h8_elf_howto_table[] = { #define R_H8_NONE_X 0 HOWTO (R_H8_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ #define R_H8_DIR32_X (R_H8_NONE_X + 1) HOWTO (R_H8_DIR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */
#define bfd_elf32_bfd_reloc_type_lookup elf32_dlx_reloc_type_lookup #define elf_info_to_howto elf32_dlx_info_to_howto #define elf_info_to_howto_rel elf32_dlx_info_to_howto_rel #define elf_backend_check_relocs elf32_dlx_check_relocs static reloc_howto_type dlx_elf_howto_table[]= { /* No relocation. */ HOWTO (R_DLX_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_DLX_NONE", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ /* 8 bit relocation. */ HOWTO (R_DLX_RELOC_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */
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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bfd.h" #include "sysdep.h" #include "libbfd.h" #include "obstack.h" #include "coff/h8300.h" #include "coff/internal.h" #include "libcoff.h" static reloc_howto_type howto_table[] = { HOWTO(R_RELBYTE, 0, 0, 8, false, 0, true, true,0,"8", true, 0x000000ff,0x000000ff, false), HOWTO(R_RELWORD, 0, 1, 16, false, 0, true, true,0,"16", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_RELLONG, 0, 2, 32, false, 0, true, true,0,"32", true, 0xffffffff,0xffffffff, false), HOWTO(R_PCRBYTE, 0, 0, 8, true, 0, false, true,0,"DISP8", true, 0x000000ff,0x000000ff, true), HOWTO(R_PCRWORD, 0, 1, 16, true, 0, false, true,0,"DISP16", true, 0x0000ffff,0x0000ffff, true), HOWTO(R_PCRLONG, 0, 2, 32, true, 0, false, true,0,"DISP32", true, 0xffffffff,0xffffffff, true), HOWTO(R_MOVB1, 0, 1, 16, false, 0, true, true,0,"16/8", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_MOVB2, 0, 1, 16, false, 0, true, true,0,"8/16", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_JMP1, 0, 1, 16, false, 0, true, true,0,"16/pcrel", true, 0x0000ffff,0x0000ffff, false), HOWTO(R_JMP2, 0, 0, 8, false, 0, true, true,0,"pcrecl/16", true, 0x000000ff,0x000000ff, false), };
Elf_Internal_Rela *, bfd_vma)); static boolean elf32_i860_is_local_label_name PARAMS ((bfd *, const char *)); /* This howto table is preliminary. */ static reloc_howto_type elf32_i860_howto_table [] = { /* This relocation does nothing. */ HOWTO (R_860_NONE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_860_NONE", /* name */ false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ false), /* pcrel_offset */ /* A 32-bit absolute relocation. */ HOWTO (R_860_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */