• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*	$NetBSD: elf_machdep.h,v 1.17 2014/02/25 19:20:09 matt Exp $	*/
2 
3 #ifndef _ARM_ELF_MACHDEP_H_
4 #define _ARM_ELF_MACHDEP_H_
5 
6 /* Android-added. */
7 #define R_ARM_IRELATIVE		160
8 
9 /* Processor specific flags for the ELF header e_flags field.  */
10 #define EF_ARM_RELEXEC		0x00000001
11 #define EF_ARM_HASENTRY		0x00000002
12 #define EF_ARM_INTERWORK	0x00000004 /* GNU binutils 000413 */
13 #define EF_ARM_SYMSARESORTED	0x00000004 /* ARM ELF A08 */
14 #define EF_ARM_APCS_26		0x00000008 /* GNU binutils 000413 */
15 #define EF_ARM_DYNSYMSUSESEGIDX	0x00000008 /* ARM ELF B01 */
16 #define EF_ARM_APCS_FLOAT	0x00000010 /* GNU binutils 000413 */
17 #define EF_ARM_MAPSYMSFIRST	0x00000010 /* ARM ELF B01 */
18 #define EF_ARM_PIC		0x00000020
19 #define EF_ARM_ALIGN8		0x00000040 /* 8-bit structure alignment.  */
20 #define EF_ARM_NEW_ABI		0x00000080
21 #define EF_ARM_OLD_ABI		0x00000100
22 #define EF_ARM_SOFT_FLOAT	0x00000200
23 #define EF_ARM_BE8		0x00800000
24 #define EF_ARM_EABIMASK		0xff000000
25 #define	EF_ARM_EABI_VER1	0x01000000
26 #define	EF_ARM_EABI_VER2	0x02000000
27 #define	EF_ARM_EABI_VER3	0x03000000
28 #define	EF_ARM_EABI_VER4	0x04000000
29 #define	EF_ARM_EABI_VER5	0x05000000
30 
31 /* Processor specific relocation types */
32 
33 #define R_ARM_NONE		0
34 #define R_ARM_PC24		1
35 #define R_ARM_ABS32		2
36 #define R_ARM_REL32		3
37 #define R_ARM_PC13		4
38 #define R_ARM_ABS16		5
39 #define R_ARM_ABS12		6
40 #define R_ARM_THM_ABS5		7
41 #define R_ARM_ABS8		8
42 #define R_ARM_SBREL32		9
43 #define R_ARM_THM_PC22		10
44 #define R_ARM_THM_PC8		11
45 #define R_ARM_AMP_VCALL9	12
46 #define R_ARM_SWI24		13
47 #define R_ARM_THM_SWI8		14
48 #define R_ARM_XPC25		15
49 #define R_ARM_THM_XPC22		16
50 
51 /* TLS relocations */
52 #define R_ARM_TLS_DTPMOD32	17	/* ID of module containing symbol */
53 #define R_ARM_TLS_DTPOFF32	18	/* Offset in TLS block */
54 #define R_ARM_TLS_TPOFF32	19	/* Offset in static TLS block */
55 
56 /* 20-31 are reserved for ARM Linux. */
57 #define R_ARM_COPY		20
58 #define R_ARM_GLOB_DAT		21
59 #define	R_ARM_JUMP_SLOT		22
60 #define R_ARM_RELATIVE		23
61 #define	R_ARM_GOTOFF		24
62 #define R_ARM_GOTPC		25
63 #define R_ARM_GOT32		26
64 #define R_ARM_PLT32		27
65 #define R_ARM_CALL		28
66 #define R_ARM_JUMP24		29
67 #define R_ARM_THM_JUMP24	30
68 #define R_ARM_BASE_ABS		31
69 #define R_ARM_ALU_PCREL_7_0	32
70 #define R_ARM_ALU_PCREL_15_8	33
71 #define R_ARM_ALU_PCREL_23_15	34
72 #define R_ARM_ALU_SBREL_11_0	35
73 #define R_ARM_ALU_SBREL_19_12	36
74 #define R_ARM_ALU_SBREL_27_20	37	// depcreated
75 #define R_ARM_TARGET1		38
76 #define R_ARM_SBREL31		39	// deprecated
77 #define R_ARM_V4BX		40
78 #define R_ARM_TARGET2		41
79 #define R_ARM_PREL31		42
80 #define R_ARM_MOVW_ABS_NC	43
81 #define R_ARM_MOVT_ABS		44
82 #define R_ARM_MOVW_PREL_NC	45
83 #define R_ARM_MOVT_PREL		46
84 #define R_ARM_THM_MOVW_ABS_NC	47
85 #define R_ARM_THM_MOVT_ABS	48
86 #define R_ARM_THM_MOVW_PREL_NC	49
87 #define R_ARM_THM_MOVT_PREL	50
88 
89 /* 96-111 are reserved to G++. */
90 #define R_ARM_GNU_VTENTRY	100
91 #define R_ARM_GNU_VTINHERIT	101
92 #define R_ARM_THM_PC11		102
93 #define R_ARM_THM_PC9		103
94 
95 /* More TLS relocations */
96 #define R_ARM_TLS_GD32		104	/* PC-rel 32 bit for global dynamic */
97 #define R_ARM_TLS_LDM32		105	/* PC-rel 32 bit for local dynamic */
98 #define R_ARM_TLS_LDO32		106	/* 32 bit offset relative to TLS */
99 #define R_ARM_TLS_IE32		107	/* PC-rel 32 bit for GOT entry of */
100 #define R_ARM_TLS_LE32		108
101 #define R_ARM_TLS_LDO12		109
102 #define R_ARM_TLS_LE12		110
103 #define R_ARM_TLS_IE12GP	111
104 
105 /* 112-127 are reserved for private experiments. */
106 
107 #define R_ARM_RXPC25		249
108 #define R_ARM_RSBREL32		250
109 #define R_ARM_THM_RPC22		251
110 #define R_ARM_RREL32		252
111 #define R_ARM_RABS32		253
112 #define R_ARM_RPC24		254
113 #define R_ARM_RBASE		255
114 
115 /* Processor specific program header flags */
116 #define PF_ARM_SB		0x10000000
117 #define PF_ARM_PI		0x20000000
118 #define PF_ARM_ENTRY		0x80000000
119 
120 /* Processor specific program header types */
121 #define PT_ARM_EXIDX		(PT_LOPROC + 1)
122 
123 /* Processor specific section header flags */
124 #define SHF_ENTRYSECT		0x10000000
125 #define SHF_COMDEF		0x80000000
126 
127 /* Processor specific symbol types */
128 #define STT_ARM_TFUNC		STT_LOPROC
129 
130 #endif /* _ARM_ELF_MACHDEP_H_ */
131