Debian Codegraph @

libdrgn/include/elf.h

raw
1 // Copyright (c) Meta Platforms, Inc. and affiliates.
2 // SPDX-License-Identifier: LGPL-2.1-or-later
3
4 // Wrapper around elf.h adding definitions that are not available in older
5 // versions of glibc.
6
7 #ifndef DRGN_ELF_H
8 #define DRGN_ELF_H
9
10 #include_next <elf.h>
11
12 // Generated by scripts/gen_elf_compat.py.
13 #ifndef NT_FILE
14 #define NT_FILE 0x46494c45
15 #endif
16 #ifndef EM_RISCV
17 #define EM_RISCV 243
18 #endif
19 #ifndef R_RISCV_NONE
20 #define R_RISCV_NONE 0
21 #endif
22 #ifndef R_RISCV_32
23 #define R_RISCV_32 1
24 #endif
25 #ifndef R_RISCV_64
26 #define R_RISCV_64 2
27 #endif
28 #ifndef R_RISCV_RELATIVE
29 #define R_RISCV_RELATIVE 3
30 #endif
31 #ifndef R_RISCV_COPY
32 #define R_RISCV_COPY 4
33 #endif
34 #ifndef R_RISCV_JUMP_SLOT
35 #define R_RISCV_JUMP_SLOT 5
36 #endif
37 #ifndef R_RISCV_TLS_DTPMOD32
38 #define R_RISCV_TLS_DTPMOD32 6
39 #endif
40 #ifndef R_RISCV_TLS_DTPMOD64
41 #define R_RISCV_TLS_DTPMOD64 7
42 #endif
43 #ifndef R_RISCV_TLS_DTPREL32
44 #define R_RISCV_TLS_DTPREL32 8
45 #endif
46 #ifndef R_RISCV_TLS_DTPREL64
47 #define R_RISCV_TLS_DTPREL64 9
48 #endif
49 #ifndef R_RISCV_TLS_TPREL32
50 #define R_RISCV_TLS_TPREL32 10
51 #endif
52 #ifndef R_RISCV_TLS_TPREL64
53 #define R_RISCV_TLS_TPREL64 11
54 #endif
55 #ifndef R_RISCV_BRANCH
56 #define R_RISCV_BRANCH 16
57 #endif
58 #ifndef R_RISCV_JAL
59 #define R_RISCV_JAL 17
60 #endif
61 #ifndef R_RISCV_CALL
62 #define R_RISCV_CALL 18
63 #endif
64 #ifndef R_RISCV_CALL_PLT
65 #define R_RISCV_CALL_PLT 19
66 #endif
67 #ifndef R_RISCV_GOT_HI20
68 #define R_RISCV_GOT_HI20 20
69 #endif
70 #ifndef R_RISCV_TLS_GOT_HI20
71 #define R_RISCV_TLS_GOT_HI20 21
72 #endif
73 #ifndef R_RISCV_TLS_GD_HI20
74 #define R_RISCV_TLS_GD_HI20 22
75 #endif
76 #ifndef R_RISCV_PCREL_HI20
77 #define R_RISCV_PCREL_HI20 23
78 #endif
79 #ifndef R_RISCV_PCREL_LO12_I
80 #define R_RISCV_PCREL_LO12_I 24
81 #endif
82 #ifndef R_RISCV_PCREL_LO12_S
83 #define R_RISCV_PCREL_LO12_S 25
84 #endif
85 #ifndef R_RISCV_HI20
86 #define R_RISCV_HI20 26
87 #endif
88 #ifndef R_RISCV_LO12_I
89 #define R_RISCV_LO12_I 27
90 #endif
91 #ifndef R_RISCV_LO12_S
92 #define R_RISCV_LO12_S 28
93 #endif
94 #ifndef R_RISCV_TPREL_HI20
95 #define R_RISCV_TPREL_HI20 29
96 #endif
97 #ifndef R_RISCV_TPREL_LO12_I
98 #define R_RISCV_TPREL_LO12_I 30
99 #endif
100 #ifndef R_RISCV_TPREL_LO12_S
101 #define R_RISCV_TPREL_LO12_S 31
102 #endif
103 #ifndef R_RISCV_TPREL_ADD
104 #define R_RISCV_TPREL_ADD 32
105 #endif
106 #ifndef R_RISCV_ADD8
107 #define R_RISCV_ADD8 33
108 #endif
109 #ifndef R_RISCV_ADD16
110 #define R_RISCV_ADD16 34
111 #endif
112 #ifndef R_RISCV_ADD32
113 #define R_RISCV_ADD32 35
114 #endif
115 #ifndef R_RISCV_ADD64
116 #define R_RISCV_ADD64 36
117 #endif
118 #ifndef R_RISCV_SUB8
119 #define R_RISCV_SUB8 37
120 #endif
121 #ifndef R_RISCV_SUB16
122 #define R_RISCV_SUB16 38
123 #endif
124 #ifndef R_RISCV_SUB32
125 #define R_RISCV_SUB32 39
126 #endif
127 #ifndef R_RISCV_SUB64
128 #define R_RISCV_SUB64 40
129 #endif
130 #ifndef R_RISCV_GNU_VTINHERIT
131 #define R_RISCV_GNU_VTINHERIT 41
132 #endif
133 #ifndef R_RISCV_GNU_VTENTRY
134 #define R_RISCV_GNU_VTENTRY 42
135 #endif
136 #ifndef R_RISCV_ALIGN
137 #define R_RISCV_ALIGN 43
138 #endif
139 #ifndef R_RISCV_RVC_BRANCH
140 #define R_RISCV_RVC_BRANCH 44
141 #endif
142 #ifndef R_RISCV_RVC_JUMP
143 #define R_RISCV_RVC_JUMP 45
144 #endif
145 #ifndef R_RISCV_RVC_LUI
146 #define R_RISCV_RVC_LUI 46
147 #endif
148 #ifndef R_RISCV_GPREL_I
149 #define R_RISCV_GPREL_I 47
150 #endif
151 #ifndef R_RISCV_GPREL_S
152 #define R_RISCV_GPREL_S 48
153 #endif
154 #ifndef R_RISCV_TPREL_I
155 #define R_RISCV_TPREL_I 49
156 #endif
157 #ifndef R_RISCV_TPREL_S
158 #define R_RISCV_TPREL_S 50
159 #endif
160 #ifndef R_RISCV_RELAX
161 #define R_RISCV_RELAX 51
162 #endif
163 #ifndef R_RISCV_SUB6
164 #define R_RISCV_SUB6 52
165 #endif
166 #ifndef R_RISCV_SET6
167 #define R_RISCV_SET6 53
168 #endif
169 #ifndef R_RISCV_SET8
170 #define R_RISCV_SET8 54
171 #endif
172 #ifndef R_RISCV_SET16
173 #define R_RISCV_SET16 55
174 #endif
175 #ifndef R_RISCV_SET32
176 #define R_RISCV_SET32 56
177 #endif
178 #ifndef R_RISCV_32_PCREL
179 #define R_RISCV_32_PCREL 57
180 #endif
181 #ifndef NT_ARM_PAC_MASK
182 #define NT_ARM_PAC_MASK 0x406
183 #endif
184
185 #endif /* DRGN_ELF_H */