1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef __A_OUT_GNU_H__
13 #define __A_OUT_GNU_H__
15 #define __GNU_EXEC_MACROS__
17 #ifndef __STRUCT_EXEC_OVERRIDE__
19 #include <asm/a.out.h>
25 M__OLDSUN2 = M_OLDSUN2,
51 #define N_MAGIC(exec) ((exec).a_info & 0xffff)
53 #define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
54 #define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
55 #define N_SET_INFO(exec, magic, type, flags) ((exec).a_info = ((magic) & 0xffff) | (((int)(type) & 0xff) << 16) | (((flags) & 0xff) << 24))
56 #define N_SET_MAGIC(exec, magic) ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
58 #define N_SET_MACHTYPE(exec, machtype) ((exec).a_info = ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
60 #define N_SET_FLAGS(exec, flags) ((exec).a_info = ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
73 #define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
76 #define _N_HDROFF(x) (1024 - sizeof (struct exec))
79 #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
83 #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
87 #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
91 #define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
95 #define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
99 #define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
103 #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
106 #if defined(vax) || defined(hp300) || defined(pyr)
107 #define SEGMENT_SIZE page_size
110 #define SEGMENT_SIZE 0x2000
113 #define SEGMENT_SIZE 0x20000
115 #if defined(m68k) && defined(PORTAR)
116 #define PAGE_SIZE 0x400
117 #define SEGMENT_SIZE PAGE_SIZE
121 #include <asm/page.h>
122 #if defined(__i386__) || defined(__mc68000__)
123 #define SEGMENT_SIZE 1024
126 #define SEGMENT_SIZE PAGE_SIZE
131 #define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
133 #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
136 #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
140 #define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
143 #ifndef N_NLIST_DECLARED
147 struct nlist *n_next;
150 unsigned char n_type;
153 unsigned long n_value;
195 #ifndef N_RELOCATION_INFO_DECLARED
197 struct relocation_info
202 unsigned int r_symbolnum:24;
204 unsigned int r_pcrel:1;
206 unsigned int r_length:2;
208 unsigned int r_extern:1;
215 unsigned int r_pad:4;