elf64-alpha.c

来自「基于4个mips核的noc设计」· C语言 代码 · 共 2,160 行 · 第 1/5 页

C
2,160
字号
	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_bitfield, /* complain_on_overflow */	 0,			/* special_function */	 "REFQUAD",		/* name */	 false,			/* partial_inplace */	 MINUS_ONE,		/* src_mask */	 MINUS_ONE,		/* dst_mask */	 false),		/* pcrel_offset */  /* A 32 bit GP relative offset.  This is just like REFLONG except     that when the value is used the value of the gp register will be     added in.  */  HOWTO (R_ALPHA_GPREL32,	/* type */	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 32,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_bitfield, /* complain_on_overflow */	 0,			/* special_function */	 "GPREL32",		/* name */	 false,			/* partial_inplace */	 0xffffffff,		/* src_mask */	 0xffffffff,		/* dst_mask */	 false),		/* pcrel_offset */  /* Used for an instruction that refers to memory off the GP register.  */  HOWTO (R_ALPHA_LITERAL,	/* type */	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "ELF_LITERAL",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 false),		/* pcrel_offset */  /* This reloc only appears immediately following an ELF_LITERAL reloc.     It identifies a use of the literal.  The symbol index is special:     1 means the literal address is in the base register of a memory     format instruction; 2 means the literal address is in the byte     offset register of a byte-manipulation instruction; 3 means the     literal address is in the target register of a jsr instruction.     This does not actually do any relocation.  */  HOWTO (R_ALPHA_LITUSE,	/* type */	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 32,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_nil,	/* special_function */	 "LITUSE",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* Load the gp register.  This is always used for a ldah instruction     which loads the upper 16 bits of the gp register.  The symbol     index of the GPDISP instruction is an offset in bytes to the lda     instruction that loads the lower 16 bits.  The value to use for     the relocation is the difference between the GP value and the     current location; the load will always be done against a register     holding the current address.     NOTE: Unlike ECOFF, partial in-place relocation is not done.  If     any offset is present in the instructions, it is an offset from     the register to the ldah instruction.  This lets us avoid any     stupid hackery like inventing a gp value to do partial relocation     against.  Also unlike ECOFF, we do the whole relocation off of     the GPDISP rather than a GPDISP_HI16/GPDISP_LO16 pair.  An odd,     space consuming bit, that, since all the information was present     in the GPDISP_HI16 reloc.  */  HOWTO (R_ALPHA_GPDISP,	/* type */	 16,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_gpdisp, /* special_function */	 "GPDISP",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 true),			/* pcrel_offset */  /* A 21 bit branch.  */  HOWTO (R_ALPHA_BRADDR,	/* type */	 2,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 21,			/* bitsize */	 true,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "BRADDR",		/* name */	 false,			/* partial_inplace */	 0x1fffff,		/* src_mask */	 0x1fffff,		/* dst_mask */	 true),			/* pcrel_offset */  /* A hint for a jump to a register.  */  HOWTO (R_ALPHA_HINT,		/* type */	 2,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 14,			/* bitsize */	 true,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 0,			/* special_function */	 "HINT",		/* name */	 false,			/* partial_inplace */	 0x3fff,		/* src_mask */	 0x3fff,		/* dst_mask */	 true),			/* pcrel_offset */  /* 16 bit PC relative offset.  */  HOWTO (R_ALPHA_SREL16,	/* type */	 0,			/* rightshift */	 1,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 true,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "SREL16",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 true),			/* pcrel_offset */  /* 32 bit PC relative offset.  */  HOWTO (R_ALPHA_SREL32,	/* type */	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 32,			/* bitsize */	 true,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "SREL32",		/* name */	 false,			/* partial_inplace */	 0xffffffff,		/* src_mask */	 0xffffffff,		/* dst_mask */	 true),			/* pcrel_offset */  /* A 64 bit PC relative offset.  */  HOWTO (R_ALPHA_SREL64,	/* type */	 0,			/* rightshift */	 4,			/* size (0 = byte, 1 = short, 2 = long) */	 64,			/* bitsize */	 true,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "SREL64",		/* name */	 false,			/* partial_inplace */	 MINUS_ONE,		/* src_mask */	 MINUS_ONE,		/* dst_mask */	 true),			/* pcrel_offset */  /* Push a value on the reloc evaluation stack.  */  /* Not implemented -- it's dumb.  */  HOWTO (R_ALPHA_OP_PUSH,	/* type */	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "OP_PUSH",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* Store the value from the stack at the given address.  Store it in     a bitfield of size r_size starting at bit position r_offset.  */  /* Not implemented -- it's dumb.  */  HOWTO (R_ALPHA_OP_STORE,	/* type */	 0,			/* rightshift */	 4,			/* size (0 = byte, 1 = short, 2 = long) */	 64,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "OP_STORE",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 MINUS_ONE,		/* dst_mask */	 false),		/* pcrel_offset */  /* Subtract the reloc address from the value on the top of the     relocation stack.  */  /* Not implemented -- it's dumb.  */  HOWTO (R_ALPHA_OP_PSUB,	/* type */	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "OP_PSUB",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* Shift the value on the top of the relocation stack right by the     given value.  */  /* Not implemented -- it's dumb.  */  HOWTO (R_ALPHA_OP_PRSHIFT,	/* type */	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "OP_PRSHIFT",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* Change the value of GP used by +r_addend until the next GPVALUE or the     end of the input bfd.  */  /* Not implemented -- it's dumb.  */  HOWTO (R_ALPHA_GPVALUE,	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "GPVALUE",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* The high 16 bits of the displacement from GP to the target.  */  HOWTO (R_ALPHA_GPRELHIGH,	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "GPRELHIGH",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 false),		/* pcrel_offset */  /* The low 16 bits of the displacement from GP to the target.  */  HOWTO (R_ALPHA_GPRELLOW,	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "GPRELLOW",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 false),		/* pcrel_offset */  /* A 16-bit displacement from the GP to the target.  */  /* XXX: Not implemented.  */  HOWTO (R_ALPHA_IMMED_GP_16,	 0,			/* rightshift */	 2,			/* size (0 = byte, 1 = short, 2 = long) */	 16,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_signed, /* complain_on_overflow */	 0,			/* special_function */	 "IMMED_GP_16",		/* name */	 false,			/* partial_inplace */	 0xffff,		/* src_mask */	 0xffff,		/* dst_mask */	 false),		/* pcrel_offset */  /* The high bits of a 32-bit displacement from the GP to the target; the     low bits are supplied in the subsequent R_ALPHA_IMMED_LO32 relocs.  */  /* XXX: Not implemented.  */  HOWTO (R_ALPHA_IMMED_GP_HI32,	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "IMMED_GP_HI32",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* The high bits of a 32-bit displacement to the starting address of the     current section (the relocation target is ignored); the low bits are     supplied in the subsequent R_ALPHA_IMMED_LO32 relocs.  */  /* XXX: Not implemented.  */  HOWTO (R_ALPHA_IMMED_SCN_HI32,	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "IMMED_SCN_HI32",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* The high bits of a 32-bit displacement from the previous br, bsr, jsr     or jmp insn (as tagged by a BRADDR or HINT reloc) to the target; the     low bits are supplied by subsequent R_ALPHA_IMMED_LO32 relocs.  */  /* XXX: Not implemented.  */  HOWTO (R_ALPHA_IMMED_BR_HI32,	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "IMMED_BR_HI32",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* The low 16 bits of a displacement calculated in a previous HI32 reloc.  */  /* XXX: Not implemented.  */  HOWTO (R_ALPHA_IMMED_LO32,	 0,			/* rightshift */	 0,			/* size (0 = byte, 1 = short, 2 = long) */	 0,			/* bitsize */	 false,			/* pc_relative */	 0,			/* bitpos */	 complain_overflow_dont, /* complain_on_overflow */	 elf64_alpha_reloc_bad, /* special_function */	 "IMMED_LO32",		/* name */	 false,			/* partial_inplace */	 0,			/* src_mask */	 0,			/* dst_mask */	 false),		/* pcrel_offset */  /* Misc ELF relocations.  */  /* A dynamic relocation to copy the target into our .dynbss section.  */  /* Not generated, as all Alpha objects use PIC, so it is not needed.  It     is present because every other ELF has one, but should not be used     because .dynbss is an ugly thing.  */  HOWTO (R_ALPHA_COPY,	 0,	 0,	 0,	 false,	 0,	 complain_overflow_dont,	 bfd_elf_generic_reloc,	 "COPY",	 false,	 0,	 0,	 true),  /* A dynamic relocation for a .got entry.  */  HOWTO (R_ALPHA_GLOB_DAT,	 0,	 0,	 0,	 false,	 0,	 complain_overflow_dont,	 bfd_elf_generic_reloc,	 "GLOB_DAT",	 false,	 0,	 0,	 true),  /* A dynamic relocation for a .plt entry.  */  HOWTO (R_ALPHA_JMP_SLOT,	 0,	 0,	 0,	 false,	 0,	 complain_overflow_dont,	 bfd_elf_generic_reloc,	 "JMP_SLOT",	 false,	 0,	 0,	 true),  /* A dynamic relocation to add the base of the DSO to a 64-bit field.  */  HOWTO (R_ALPHA_RELATIVE,	 0,	 0,	 0,	 false,	 0,	 complain_overflow_dont,	 bfd_elf_generic_reloc,	 "RELATIVE",	 false,	 0,	 0,	 true)};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?