unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
};
-/* X86-64 relocations. */
-#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */
-#define R_AMD64_DIR64 1 /* 64-bit address (VA). */
-#define R_AMD64_DIR32 2 /* 32-bit address (VA) R_DIR32. */
-#define R_AMD64_IMAGEBASE 3 /* 32-bit absolute ref w/o base R_IMAGEBASE. */
-#define R_AMD64_PCRLONG 4 /* 32-bit relative address from byte following reloc R_PCRLONG. */
-#define R_AMD64_PCRLONG_1 5 /* 32-bit relative address from byte distance 1 from reloc. */
-#define R_AMD64_PCRLONG_2 6 /* 32-bit relative address from byte distance 2 from reloc. */
-#define R_AMD64_PCRLONG_3 7 /* 32-bit relative address from byte distance 3 from reloc. */
-#define R_AMD64_PCRLONG_4 8 /* 32-bit relative address from byte distance 4 from reloc. */
-#define R_AMD64_PCRLONG_5 9 /* 32-bit relative address from byte distance 5 from reloc. */
-#define R_AMD64_SECTION 10 /* Section index. */
-#define R_AMD64_SECREL 11 /* 32 bit offset from base of section containing target R_SECREL. */
-#define R_AMD64_SECREL7 12 /* 7 bit unsigned offset from base of section containing target. */
-#define R_AMD64_TOKEN 13 /* 32 bit metadata token. */
-#define R_AMD64_PCRQUAD 14 /* Pseude PC64 relocation - Note: not specified by MS/AMD but need for gas pc-relative 64bit wide relocation generated by ELF. */
-
-/* i386 Relocations. */
-
-#define R_DIR16 1
-#define R_REL24 5
-#define R_DIR32 6
-#define R_IMAGEBASE 7
-#define R_SECREL32 11
-#define R_RELBYTE 15
-#define R_RELWORD 16
-#define R_RELLONG 17
-#define R_PCRBYTE 18
-#define R_PCRWORD 19
-#define R_PCRLONG 20
-#define R_PCR24 21
-#define R_IPRSHORT 24
-#define R_IPRLONG 26
-#define R_GETSEG 29
-#define R_GETPA 30
-#define R_TAGWORD 31
-#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */
-#define R_PARTLS16 32
-#define R_PARTMS8 33
-
-#define R_PCR16L 128
-#define R_PCR26L 129
-#define R_VRT16 130
-#define R_HVRT16 131
-#define R_LVRT16 132
-#define R_VRT32 133
-
-
-/* This reloc identifies mov.b instructions with a 16bit absolute
- address. The linker tries to turn insns with this reloc into
- an absolute 8-bit address. */
-#define R_MOV16B1 0x41
-
-/* This reloc identifies mov.b instructions which had a 16bit
- absolute address which have been shortened into a 8-bit
- absolute address. */
-#define R_MOV16B2 0x42
-
-/* This reloc identifies jmp insns with a 16bit target address;
- the linker tries to turn these insns into bra insns with
- an 8bit pc-relative target. */
-#define R_JMP1 0x43
-
-/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerly a jmp insn with a 16bit target. */
-#define R_JMP2 0x44
-
-/* ??? */
-#define R_RELLONG_NEG 0x45
-
-/* This reloc identifies jmp insns with a 24bit target address;
- the linker tries to turn these insns into bra insns with
- an 8bit pc-relative target. */
-#define R_JMPL1 0x46
-
-/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerly a jmp insn with a 24bit target. */
-#define R_JMPL2 0x47
-
-/* This reloc identifies mov.b instructions with a 24bit absolute
- address. The linker tries to turn insns with this reloc into
- an absolute 8-bit address. */
-
-#define R_MOV24B1 0x48
-
-/* This reloc identifies mov.b instructions which had a 24bit
- absolute address which have been shortened into a 8-bit
- absolute address. */
-#define R_MOV24B2 0x49
-
-/* An h8300 memory indirect jump/call. Forces the address of the jump/call
- target into the function vector (in page zero), and the address of the
- vector entry to be placed in the jump/call instruction. */
-#define R_MEM_INDIRECT 0x4a
-
-/* This reloc identifies a 16bit pc-relative branch target which was
- shortened into an 8bit pc-relative branch target. */
-#define R_PCRWORD_B 0x4b
-
-/* This reloc identifies mov.[wl] instructions with a 32/24 bit
- absolute address; the linker may turn this into a mov.[wl]
- insn with a 16bit absolute address. */
-#define R_MOVL1 0x4c
-
-/* This reloc identifies mov.[wl] insns which formerly had
- a 32/24bit absolute address and now have a 16bit absolute address. */
-#define R_MOVL2 0x4d
-
-/* This reloc identifies a bCC:8 which will have it's condition
- inverted and its target redirected to the target of the branch
- in the following insn. */
-#define R_BCC_INV 0x4e
-
-/* This reloc identifies a jmp instruction that has been deleted. */
-#define R_JMP_DEL 0x4f
-
-/* Z8k modes */
-#define R_IMM16 0x01 /* 16 bit abs */
-#define R_JR 0x02 /* jr 8 bit disp */
-#define R_IMM4L 0x23 /* low nibble */
-#define R_IMM8 0x22 /* 8 bit abs */
-#define R_IMM32 R_RELLONG /* 32 bit abs */
-#define R_CALL R_DA /* Absolute address which could be a callr */
-#define R_JP R_DA /* Absolute address which could be a jp */
-#define R_REL16 0x04 /* 16 bit PC rel */
-#define R_CALLR 0x05 /* callr 12 bit disp */
-#define R_SEG 0x10 /* set if in segmented mode */
-#define R_IMM4H 0x24 /* high nibble */
-#define R_DISP7 0x25 /* djnz displacement */
-
-/* Z80 modes */
-#define R_OFF8 0x32 /* 8 bit signed abs, for (i[xy]+d) */
-#define R_IMM24 0x33 /* 24 bit abs */
-#define R_IMM16BE 0x3A /* 16 bit abs, big endian */
-/* R_JR, R_IMM8, R_IMM16, R_IMM32 - as for Z8k */
-#define R_BYTE0 0x34 /* first (lowest) 8 bits of multibyte value */
-#define R_BYTE1 0x35 /* second 8 bits of multibyte value */
-#define R_BYTE2 0x36 /* third 8 bits of multibyte value */
-#define R_BYTE3 0x37 /* fourth (highest) 8 bits of multibyte value */
-#define R_WORD0 0x38 /* lowest 16 bits of 32 or 24 bit value */
-#define R_WORD1 0x39 /* highest 16 bits of 32 or 24 bit value */
-
#endif /* GNU_COFF_INTERNAL_H */
do memset (dst->r_reserved, 0, sizeof (dst->r_reserved)); while (0)
/* various relocation types. */
-#define R_ABS 0x0000 /* no relocation */
-#define R_REL13 0x002A /* 13-bit direct reference (???) */
-#define R_PARTLS7 0x0028 /* 7 LSBs of an address */
-#define R_PARTMS9 0x0029 /* 9MSBs of an address */
-#define R_EXTWORD 0x002B /* 23-bit direct reference */
-#define R_EXTWORD16 0x002C /* 16-bit direct reference to 23-bit addr*/
-#define R_EXTWORDMS7 0x002D /* upper 7 bits of 23-bit address */
+#define R_REL24 5
+#define R_RELWORD 16
+#define R_RELLONG 17
+#define R_PCRWORD 19
+#define R_PCR24 21
+#define R_PARTLS16 32
+#define R_PARTMS8 33
+
+#define R_ABS 0 /* no relocation */
+#define R_REL13 0x2A /* 13-bit direct reference (???) */
+#define R_PARTLS7 0x28 /* 7 LSBs of an address */
+#define R_PARTMS9 0x29 /* 9MSBs of an address */
+#define R_EXTWORD 0x2B /* 23-bit direct reference */
+#define R_EXTWORD16 0x2C /* 16-bit direct reference to 23-bit addr*/
+#define R_EXTWORDMS7 0x2D /* upper 7 bits of 23-bit address */
#endif /* COFF_TI_H */
#define RELOC struct external_reloc
#define RELSZ 10
+
+/* X86-64 relocations. */
+#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */
+#define R_AMD64_DIR64 1 /* 64-bit address (VA). */
+#define R_AMD64_DIR32 2 /* 32-bit address (VA) R_DIR32. */
+#define R_AMD64_IMAGEBASE 3 /* 32-bit absolute ref w/o base R_IMAGEBASE. */
+#define R_AMD64_PCRLONG 4 /* 32-bit relative address from byte following reloc R_PCRLONG. */
+#define R_AMD64_PCRLONG_1 5 /* 32-bit relative address from byte distance 1 from reloc. */
+#define R_AMD64_PCRLONG_2 6 /* 32-bit relative address from byte distance 2 from reloc. */
+#define R_AMD64_PCRLONG_3 7 /* 32-bit relative address from byte distance 3 from reloc. */
+#define R_AMD64_PCRLONG_4 8 /* 32-bit relative address from byte distance 4 from reloc. */
+#define R_AMD64_PCRLONG_5 9 /* 32-bit relative address from byte distance 5 from reloc. */
+#define R_AMD64_SECTION 10 /* Section index. */
+#define R_AMD64_SECREL 11 /* 32 bit offset from base of section containing target R_SECREL. */
+#define R_AMD64_SECREL7 12 /* 7 bit unsigned offset from base of section containing target. */
+#define R_AMD64_TOKEN 13 /* 32 bit metadata token. */
+#define R_AMD64_PCRQUAD 14 /* Pseude PC64 relocation - Note: not specified by MS/AMD but need for gas pc-relative 64bit wide relocation generated by ELF. */
+
+/* i386 Relocations. */
+
+#define R_DIR32 6
+#define R_IMAGEBASE 7
+#define R_SECREL32 11
+#define R_RELBYTE 15
+#define R_RELWORD 16
+#define R_RELLONG 17
+#define R_PCRBYTE 18
+#define R_PCRWORD 19
+#define R_PCRLONG 20