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