1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI__A_OUT_GNU_H__
20 #define _UAPI__A_OUT_GNU_H__
21 #define __GNU_EXEC_MACROS__
22 #ifndef __STRUCT_EXEC_OVERRIDE__
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <asm/a.out.h>
25 #endif
26 #ifndef __ASSEMBLY__
27 enum machine_type {
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #ifdef M_OLDSUN2
30  M__OLDSUN2 = M_OLDSUN2,
31 #else
32  M_OLDSUN2 = 0,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #endif
35 #ifdef M_68010
36  M__68010 = M_68010,
37 #else
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  M_68010 = 1,
40 #endif
41 #ifdef M_68020
42  M__68020 = M_68020,
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #else
45  M_68020 = 2,
46 #endif
47 #ifdef M_SPARC
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  M__SPARC = M_SPARC,
50 #else
51  M_SPARC = 3,
52 #endif
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  M_386 = 100,
55  M_MIPS1 = 151,
56  M_MIPS2 = 152
57 };
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #ifndef N_MAGIC
60 #define N_MAGIC(exec) ((exec).a_info & 0xffff)
61 #endif
62 #define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
65 #define N_SET_INFO(exec, magic, type, flags)   ((exec).a_info = ((magic) & 0xffff)   | (((int)(type) & 0xff) << 16)   | (((flags) & 0xff) << 24))
66 #define N_SET_MAGIC(exec, magic)   ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
67 #define N_SET_MACHTYPE(exec, machtype)   ((exec).a_info =   ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define N_SET_FLAGS(exec, flags)   ((exec).a_info =   ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
70 #define OMAGIC 0407
71 #define NMAGIC 0410
72 #define ZMAGIC 0413
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define QMAGIC 0314
75 #define CMAGIC 0421
76 #ifndef N_BADMAG
77 #define N_BADMAG(x) (N_MAGIC(x) != OMAGIC   && N_MAGIC(x) != NMAGIC   && N_MAGIC(x) != ZMAGIC   && N_MAGIC(x) != QMAGIC)
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #endif
80 #define _N_HDROFF(x) (1024 - sizeof (struct exec))
81 #ifndef N_TXTOFF
82 #define N_TXTOFF(x)   (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) :   (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #endif
85 #ifndef N_DATOFF
86 #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
87 #endif
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #ifndef N_TRELOFF
90 #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
91 #endif
92 #ifndef N_DRELOFF
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
95 #endif
96 #ifndef N_SYMOFF
97 #define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #endif
100 #ifndef N_STROFF
101 #define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
102 #endif
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #ifndef N_TXTADDR
105 #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
106 #endif
107 #if defined(vax) || defined(hp300) || defined(pyr)
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define SEGMENT_SIZE page_size
110 #endif
111 #ifdef sony
112 #define SEGMENT_SIZE 0x2000
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #endif
115 #ifdef is68k
116 #define SEGMENT_SIZE 0x20000
117 #endif
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #if defined(m68k) && defined(PORTAR)
120 #define PAGE_SIZE 0x400
121 #define SEGMENT_SIZE PAGE_SIZE
122 #endif
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #ifdef linux
125 #include <unistd.h>
126 #if defined(__i386__) || defined(__mc68000__)
127 #define SEGMENT_SIZE 1024
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #else
130 #ifndef SEGMENT_SIZE
131 #define SEGMENT_SIZE getpagesize()
132 #endif
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #endif
135 #endif
136 #define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
137 #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #ifndef N_DATADDR
140 #define N_DATADDR(x)   (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x))   : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
141 #endif
142 #ifndef N_BSSADDR
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 #define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
145 #endif
146 #ifndef N_NLIST_DECLARED
147 struct nlist {
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  union {
150  char *n_name;
151  struct nlist *n_next;
152  long n_strx;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  } n_un;
155  unsigned char n_type;
156  char n_other;
157  short n_desc;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  unsigned long n_value;
160 };
161 #endif
162 #ifndef N_UNDF
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define N_UNDF 0
165 #endif
166 #ifndef N_ABS
167 #define N_ABS 2
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 #endif
170 #ifndef N_TEXT
171 #define N_TEXT 4
172 #endif
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 #ifndef N_DATA
175 #define N_DATA 6
176 #endif
177 #ifndef N_BSS
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 #define N_BSS 8
180 #endif
181 #ifndef N_FN
182 #define N_FN 15
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #endif
185 #ifndef N_EXT
186 #define N_EXT 1
187 #endif
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #ifndef N_TYPE
190 #define N_TYPE 036
191 #endif
192 #ifndef N_STAB
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 #define N_STAB 0340
195 #endif
196 #define N_INDR 0xa
197 #define N_SETA 0x14
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 #define N_SETT 0x16
200 #define N_SETD 0x18
201 #define N_SETB 0x1A
202 #define N_SETV 0x1C
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 #ifndef N_RELOCATION_INFO_DECLARED
205 struct relocation_info
206 {
207  int r_address;
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209  unsigned int r_symbolnum:24;
210  unsigned int r_pcrel:1;
211  unsigned int r_length:2;
212  unsigned int r_extern:1;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #ifdef NS32K
215  unsigned r_bsr:1;
216  unsigned r_disp:1;
217  unsigned r_pad:2;
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #else
220  unsigned int r_pad:4;
221 #endif
222 };
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #endif
225 #endif
226 #endif
227