No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / alpha / include / elf_machdep.h
blobab8737a2f08defad8d915b6e35e40778f18ab31f
1 /* $NetBSD: elf_machdep.h,v 1.10 2001/12/09 23:05:56 thorpej Exp $ */
3 #ifndef _ALPHA_ELF_MACHDEP_H_
4 #define _ALPHA_ELF_MACHDEP_H_
6 /*
7 * Alpha ELF uses different (non-standard) definitions of Elf64_Sword
8 * and Elf64_Word.
9 */
10 typedef int64_t Elf64_Sword;
11 #define ELF64_FSZ_SWORD 8
12 typedef uint64_t Elf64_Word;
13 #define ELF64_FSZ_WORD 8
15 #define ELF32_MACHDEP_ENDIANNESS XXX /* break compilation */
16 #define ELF32_MACHDEP_ID_CASES \
17 /* no 32-bit ELF machine types supported */
19 #define ELF64_MACHDEP_ENDIANNESS ELFDATA2LSB
20 #define ELF64_MACHDEP_ID_CASES \
21 case EM_ALPHA: \
22 case EM_ALPHA_EXP: \
23 break;
25 #define ELF64_MACHDEP_ID EM_ALPHA_EXP /* XXX */
27 #define ARCH_ELFSIZE 64 /* MD native binary size */
30 * Alpha Relocation Types
32 #define R_ALPHA_NONE 0 /* No reloc */
33 #define R_ALPHA_REFLONG 1 /* Direct 32 bit */
34 #define R_ALPHA_REFQUAD 2 /* Direct 64 bit */
35 #define R_ALPHA_GPREL32 3 /* GP relative 32 bit */
36 #define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */
37 #define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */
38 #define R_ALPHA_GPDISP 6 /* Add displacement to GP */
39 #define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */
40 #define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */
41 #define R_ALPHA_SREL16 9 /* PC relative 16 bit */
42 #define R_ALPHA_SREL32 10 /* PC relative 32 bit */
43 #define R_ALPHA_SREL64 11 /* PC relative 64 bit */
44 #define R_ALPHA_OP_PUSH 12 /* OP stack push */
45 #define R_ALPHA_OP_STORE 13 /* OP stack pop and store */
46 #define R_ALPHA_OP_PSUB 14 /* OP stack subtract */
47 #define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */
48 #define R_ALPHA_GPVALUE 16
49 #define R_ALPHA_GPRELHIGH 17
50 #define R_ALPHA_GPRELLOW 18
51 #define R_ALPHA_IMMED_GP_16 19
52 #define R_ALPHA_IMMED_GP_HI32 20
53 #define R_ALPHA_IMMED_SCN_HI32 21
54 #define R_ALPHA_IMMED_BR_HI32 22
55 #define R_ALPHA_IMMED_LO32 23
56 #define R_ALPHA_COPY 24 /* Copy symbol at runtime */
57 #define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
58 #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
59 #define R_ALPHA_RELATIVE 27 /* Adjust by program base */
61 /* TLS relocations */
62 #define R_ALPHA_TLS_GD 29
63 #define R_ALPHA_TLSLDM 30
64 #define R_ALPHA_DTPMOD64 31
65 #define R_ALPHA_GOTDTPREL 32
66 #define R_ALPHA_DTPREL64 33
67 #define R_ALPHA_DTPRELHI 34
68 #define R_ALPHA_DTPRELLO 35
69 #define R_ALPHA_DTPREL16 36
70 #define R_ALPHA_GOTTPREL 37
71 #define R_ALPHA_TPREL64 38
72 #define R_ALPHA_TPRELHI 39
73 #define R_ALPHA_TPRELLO 40
74 #define R_ALPHA_TPREL16 41
76 #define R_TYPE(name) __CONCAT(R_ALPHA_,name)
78 #endif /* _ALPHA_ELF_MACHDEP_H_ */