1/* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6#ifndef _UAPI__A_OUT_GNU_H__ 7#define _UAPI__A_OUT_GNU_H__ 8#define __GNU_EXEC_MACROS__ 9#ifndef __STRUCT_EXEC_OVERRIDE__ 10#include <asm/a.out.h> 11#endif 12#ifndef __ASSEMBLY__ 13enum machine_type { 14#if defined (M_OLDSUN2) 15 M__OLDSUN2 = M_OLDSUN2, 16#else 17 M_OLDSUN2 = 0, 18#endif 19#if defined (M_68010) 20 M__68010 = M_68010, 21#else 22 M_68010 = 1, 23#endif 24#if defined (M_68020) 25 M__68020 = M_68020, 26#else 27 M_68020 = 2, 28#endif 29#if defined (M_SPARC) 30 M__SPARC = M_SPARC, 31#else 32 M_SPARC = 3, 33#endif 34 35 M_386 = 100, 36 M_MIPS1 = 151, 37 M_MIPS2 = 152 38}; 39#if !defined (N_MAGIC) 40#define N_MAGIC(exec) ((exec).a_info & 0xffff) 41#endif 42#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) 43#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) 44#define N_SET_INFO(exec, magic, type, flags) \ 45 ((exec).a_info = ((magic) & 0xffff) \ 46 | (((int)(type) & 0xff) << 16) \ 47 | (((flags) & 0xff) << 24)) 48#define N_SET_MAGIC(exec, magic) \ 49 ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff))) 50#define N_SET_MACHTYPE(exec, machtype) \ 51 ((exec).a_info = \ 52 ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) 53#define N_SET_FLAGS(exec, flags) \ 54 ((exec).a_info = \ 55 ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) 56#define OMAGIC 0407 57#define NMAGIC 0410 58#define ZMAGIC 0413 59#define QMAGIC 0314 60#define CMAGIC 0421 61#if !defined (N_BADMAG) 62#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \ 63 && N_MAGIC(x) != NMAGIC \ 64 && N_MAGIC(x) != ZMAGIC \ 65 && N_MAGIC(x) != QMAGIC) 66#endif 67#define _N_HDROFF(x) (1024 - sizeof (struct exec)) 68#if !defined (N_TXTOFF) 69#define N_TXTOFF(x) \ 70 (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \ 71 (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) 72#endif 73#if !defined (N_DATOFF) 74#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) 75#endif 76#if !defined (N_TRELOFF) 77#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) 78#endif 79#if !defined (N_DRELOFF) 80#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) 81#endif 82#if !defined (N_SYMOFF) 83#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x)) 84#endif 85#if !defined (N_STROFF) 86#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) 87#endif 88#if !defined (N_TXTADDR) 89#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0) 90#endif 91#ifndef __KERNEL__ 92#include <unistd.h> 93#endif 94#if defined(__i386__) || defined(__mc68000__) 95#define SEGMENT_SIZE 1024 96#else 97#ifndef SEGMENT_SIZE 98#ifndef __KERNEL__ 99#define SEGMENT_SIZE getpagesize() 100#endif 101#endif 102#endif 103#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE) 104#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) 105#ifndef N_DATADDR 106#define N_DATADDR(x) \ 107 (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \ 108 : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) 109#endif 110#if !defined (N_BSSADDR) 111#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) 112#endif 113 114#if !defined (N_NLIST_DECLARED) 115struct nlist { 116 union { 117 char *n_name; 118 struct nlist *n_next; 119 long n_strx; 120 } n_un; 121 unsigned char n_type; 122 char n_other; 123 short n_desc; 124 unsigned long n_value; 125}; 126#endif 127#if !defined (N_UNDF) 128#define N_UNDF 0 129#endif 130#if !defined (N_ABS) 131#define N_ABS 2 132#endif 133#if !defined (N_TEXT) 134#define N_TEXT 4 135#endif 136#if !defined (N_DATA) 137#define N_DATA 6 138#endif 139#if !defined (N_BSS) 140#define N_BSS 8 141#endif 142#if !defined (N_FN) 143#define N_FN 15 144#endif 145#if !defined (N_EXT) 146#define N_EXT 1 147#endif 148#if !defined (N_TYPE) 149#define N_TYPE 036 150#endif 151#if !defined (N_STAB) 152#define N_STAB 0340 153#endif 154#define N_INDR 0xa 155#define N_SETA 0x14 156#define N_SETT 0x16 157#define N_SETD 0x18 158#define N_SETB 0x1A 159#define N_SETV 0x1C 160 161#if !defined (N_RELOCATION_INFO_DECLARED) 162struct relocation_info 163{ 164 165 int r_address; 166 167 unsigned int r_symbolnum:24; 168 169 unsigned int r_pcrel:1; 170 171 unsigned int r_length:2; 172 173 unsigned int r_extern:1; 174 175 unsigned int r_pad:4; 176}; 177#endif 178#endif 179#endif 180