blob: f69eb73b77b5ac4361a053ae7a25edfa01fc1bd7 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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__
27enum machine_type {
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#ifdef M_OLDSUN2
Tao Baod7db5942015-01-28 10:07:51 -080030 M__OLDSUN2 = M_OLDSUN2,
Ben Cheng655a7c02013-10-16 16:09:24 -070031#else
Tao Baod7db5942015-01-28 10:07:51 -080032 M_OLDSUN2 = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#endif
35#ifdef M_68010
Tao Baod7db5942015-01-28 10:07:51 -080036 M__68010 = M_68010,
Ben Cheng655a7c02013-10-16 16:09:24 -070037#else
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 M_68010 = 1,
Ben Cheng655a7c02013-10-16 16:09:24 -070040#endif
41#ifdef M_68020
Tao Baod7db5942015-01-28 10:07:51 -080042 M__68020 = M_68020,
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#else
Tao Baod7db5942015-01-28 10:07:51 -080045 M_68020 = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -070046#endif
47#ifdef M_SPARC
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 M__SPARC = M_SPARC,
Ben Cheng655a7c02013-10-16 16:09:24 -070050#else
Tao Baod7db5942015-01-28 10:07:51 -080051 M_SPARC = 3,
Ben Cheng655a7c02013-10-16 16:09:24 -070052#endif
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 M_386 = 100,
55 M_MIPS1 = 151,
56 M_MIPS2 = 152
Ben Cheng655a7c02013-10-16 16:09:24 -070057};
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
Tao Baod7db5942015-01-28 10:07:51 -080062#define N_MACHTYPE(exec) ((enum machine_type) (((exec).a_info >> 16) & 0xff))
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
Tao Baod7db5942015-01-28 10:07:51 -080065#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))
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069#define N_SET_FLAGS(exec,flags) ((exec).a_info = ((exec).a_info & 0x00ffffff) | (((flags) & 0xff) << 24))
Ben Cheng655a7c02013-10-16 16:09:24 -070070#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
Tao Baod7db5942015-01-28 10:07:51 -080077#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#endif
Tao Baod7db5942015-01-28 10:07:51 -080080#define _N_HDROFF(x) (1024 - sizeof(struct exec))
Ben Cheng655a7c02013-10-16 16:09:24 -070081#ifndef N_TXTOFF
Tao Baod7db5942015-01-28 10:07:51 -080082#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof(struct exec) : (N_MAGIC(x) == QMAGIC ? 0 : sizeof(struct exec)))
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* 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)
Tao Baod7db5942015-01-28 10:07:51 -0800137#define _N_TXTENDADDR(x) (N_TXTADDR(x) + (x).a_text)
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#ifndef N_DATADDR
Tao Baod7db5942015-01-28 10:07:51 -0800140#define N_DATADDR(x) (N_MAGIC(x) == OMAGIC ? (_N_TXTENDADDR(x)) : (_N_SEGMENT_ROUND(_N_TXTENDADDR(x))))
Ben Cheng655a7c02013-10-16 16:09:24 -0700141#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
147struct nlist {
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 union {
150 char * n_name;
151 struct nlist * n_next;
152 long n_strx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 } n_un;
155 unsigned char n_type;
156 char n_other;
157 short n_desc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 unsigned long n_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700160};
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
Tao Baod7db5942015-01-28 10:07:51 -0800205struct relocation_info {
206 int r_address;
207 unsigned int r_symbolnum : 24;
Ben Cheng655a7c02013-10-16 16:09:24 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800209 unsigned int r_pcrel : 1;
210 unsigned int r_length : 2;
211 unsigned int r_extern : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700212#ifdef NS32K
Ben Cheng655a7c02013-10-16 16:09:24 -0700213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800214 unsigned r_bsr : 1;
215 unsigned r_disp : 1;
216 unsigned r_pad : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700217#else
Tao Baod7db5942015-01-28 10:07:51 -0800218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 unsigned int r_pad : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700220#endif
221};
Ben Cheng655a7c02013-10-16 16:09:24 -0700222#endif
Tao Baod7db5942015-01-28 10:07:51 -0800223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700224#endif
225#endif