Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Enumerations
aout_gnu.h File Reference

Go to the source code of this file.

Classes

struct  exec_bytes
struct  exec
struct  nlist
struct  reloc_std_bytes
struct  relocation_info
union  nlist.n_un

Defines

#define USE_EXTENDED_RELOC   defined(TC_SPARC)
#define __GNU_EXEC_MACROS__
#define EXEC_BYTES_SIZE   (8 * 4)
#define N_MAGIC(exec)   ((exec).a_info & 0xffff)
#define N_MACHTYPE(exec)   ((enum machine_type)(((exec).a_info >> 16) & 0xff))
#define N_FLAGS(exec)   (((exec).a_info >> 24) & 0xff)
#define N_SET_INFO(exec, magic, type, flags)
#define N_SET_MAGIC(exec, magic)   ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
#define N_SET_MACHTYPE(exec, machtype)
#define N_SET_FLAGS(exec, flags)
#define OMAGIC   0407
#define NMAGIC   0410
#define ZMAGIC   0413
#define N_TXTADDR(x)   (N_MAGIC(x)==OMAGIC? 0 : TEXT_START_ADDR)
#define N_BADMAG(x)
#define N_SEGSIZE(x)   SEGMENT_SIZE
#define _N_HDROFF(x)   (N_SEGSIZE(x) - sizeof (struct exec))
#define N_TXTOFF(x)
#define N_DATOFF(x)   ( N_TXTOFF(x) + (x).a_text )
#define N_TRELOFF(x)   ( N_DATOFF(x) + (x).a_data )
#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x).a_trsize )
#define N_SYMOFF(x)   ( N_DRELOFF(x) + (x).a_drsize )
#define N_STROFF(x)   ( N_SYMOFF(x) + (x).a_syms )
#define N_DATADDR(x)
#define N_BSSADDR(x)   (N_DATADDR(x) + (x).a_data)
#define N_UNDF   0
#define N_ABS   2
#define N_TEXT   4
#define N_DATA   6
#define N_BSS   8
#define N_COMM   0x12 /* common (visible in shared lib commons) */
#define N_FN   0x1F /* File name of a .o file */
#define N_EXT   1
#define N_TYPE   036
#define N_STAB   0340
#define N_INDR   0xa
#define N_SETA   0x14 /* Absolute set element symbol */
#define N_SETT   0x16 /* Text set element symbol */
#define N_SETD   0x18 /* Data set element symbol */
#define N_SETB   0x1A /* Bss set element symbol */
#define N_SETV   0x1C /* Pointer to set vector in data area. */
#define N_WARNING   0x1e
#define N_WEAKU   0x0d /* Weak undefined symbol. */
#define N_WEAKA   0x0e /* Weak absolute symbol. */
#define N_WEAKT   0x0f /* Weak text symbol. */
#define N_WEAKD   0x10 /* Weak data symbol. */
#define N_WEAKB   0x11 /* Weak bss symbol. */
#define RELOC_STD_BITS_PCREL_BIG   0x80
#define RELOC_STD_BITS_PCREL_LITTLE   0x01
#define RELOC_STD_BITS_LENGTH_BIG   0x60
#define RELOC_STD_BITS_LENGTH_SH_BIG   5 /* To shift to units place */
#define RELOC_STD_BITS_LENGTH_LITTLE   0x06
#define RELOC_STD_BITS_LENGTH_SH_LITTLE   1
#define RELOC_STD_BITS_EXTERN_BIG   0x10
#define RELOC_STD_BITS_EXTERN_LITTLE   0x08
#define RELOC_STD_BITS_BASEREL_BIG   0x08
#define RELOC_STD_BITS_BASEREL_LITTLE   0x08
#define RELOC_STD_BITS_JMPTABLE_BIG   0x04
#define RELOC_STD_BITS_JMPTABLE_LITTLE   0x04
#define RELOC_STD_BITS_RELATIVE_BIG   0x02
#define RELOC_STD_BITS_RELATIVE_LITTLE   0x02
#define RELOC_STD_SIZE   8 /* Bytes per relocation entry */

Enumerations

enum  machine_type {
  M_UNKNOWN = 0, M_68010 = 1, M_68020 = 2, M_SPARC = 3,
  M_NS32032 = (64), M_NS32532 = (64 + 5), M_386 = 100, M_29K = 101,
  M_386_DYNIX = 102, M_ARM = 103, M_SPARCLET = 131, M_386_NETBSD = 134,
  M_68K_NETBSD = 135, M_68K4K_NETBSD = 136, M_532_NETBSD = 137, M_SPARC_NETBSD = 138,
  M_PMAX_NETBSD = 139, M_VAX_NETBSD = 140, M_ALPHA_NETBSD = 141, M_ARM6_NETBSD = 143,
  M_SPARCLET_1 = 147, M_POWERPC_NETBSD = 149, M_VAX4K_NETBSD = 150, M_MIPS1 = 151,
  M_MIPS2 = 152, M_88K_OPENBSD = 153, M_HPPA_OPENBSD = 154, M_SPARC64_NETBSD = 156,
  M_X86_64_NETBSD = 157, M_SPARCLET_2 = 163, M_SPARCLET_3 = 179, M_SPARCLET_4 = 195,
  M_HP200 = 200, M_HP300 = (300 % 256), M_HPUX = (0x20c % 256), M_SPARCLET_5 = 211,
  M_SPARCLET_6 = 227, M_SPARCLITE_LE = 243, M_CRIS = 255, M_UNKNOWN = 0,
  M_68010 = 1, M_68020 = 2, M_SPARC = 3, M_386 = 100,
  M_29K = 101, M_RS6000 = 102, M_VAX4K_NETBSD = 150, M_HP200 = 200,
  M_HP300 = 300, M_HPUX23 = 0x020C
}

Class Documentation

struct exec_bytes

Definition at line 75 of file aout_gnu.h.

Class Members
unsigned char a_bss
unsigned char a_data
unsigned char a_drsize
unsigned char a_entry
unsigned char a_info
unsigned char a_syms
unsigned char a_text
unsigned char a_trsize
struct exec

Definition at line 92 of file aout_gnu.h.

Class Members
unsigned long a_bss
unsigned a_bss
unsigned long a_data
unsigned a_data
unsigned long a_drsize
unsigned a_drsize
unsigned long a_entry
unsigned a_entry
unsigned long a_info
unsigned short a_machtype
unsigned short a_magic
unsigned long a_spare1
unsigned long a_spare2
unsigned long a_spare3
unsigned long a_spare4
unsigned long a_spare5
unsigned long a_spare6
unsigned long a_spare7
unsigned long a_spare8
unsigned long a_syms
unsigned a_syms
unsigned long a_text
unsigned a_text
unsigned long a_trsize
unsigned a_trsize
struct nlist

Definition at line 221 of file aout_gnu.h.

Class Members
short n_desc
char n_other
unsigned char n_type
union nlist n_un
union nlist n_un
unsigned long n_value
struct reloc_std_bytes

Definition at line 380 of file aout_gnu.h.

Class Members
unsigned char r_address
unsigned char r_bits
unsigned char r_index
struct relocation_info

Definition at line 412 of file aout_gnu.h.

Class Members
r_symbolnum __pad0__:24
unsigned nuthin:1
int r_address
unsigned int r_baserel:1
unsigned r_bsr:1
r_symbolnum r_bsr:1
unsigned r_callj:1
r_symbolnum r_callj:1
unsigned r_disp:1
r_symbolnum r_disp:1
unsigned r_extern:1
r_symbolnum r_extern:1
unsigned int r_extern:1
unsigned r_index:24
unsigned int r_jmptable:1
unsigned r_length:2
r_symbolnum r_length:2
unsigned int r_length:2
unsigned int r_pad:1
unsigned r_pcrel:1
r_symbolnum r_pcrel:1
unsigned int r_pcrel:1
unsigned int r_relative:1
r_symbolnum r_relaxable:1
unsigned int r_symbolnum:24
union nlist.n_un

Definition at line 223 of file aout_gnu.h.

Class Members
char * n_name
struct nlist * n_next
long n_strx

Define Documentation

Definition at line 67 of file aout_gnu.h.

#define _N_HDROFF (   x)    (N_SEGSIZE(x) - sizeof (struct exec))

Definition at line 178 of file aout_gnu.h.

#define EXEC_BYTES_SIZE   (8 * 4)

Definition at line 88 of file aout_gnu.h.

#define N_ABS   2

Definition at line 237 of file aout_gnu.h.

#define N_BADMAG (   x)
Value:
(N_MAGIC(x) != OMAGIC              \
                        && N_MAGIC(x) != NMAGIC         \
                        && N_MAGIC(x) != ZMAGIC)

Definition at line 165 of file aout_gnu.h.

#define N_BSS   8

Definition at line 240 of file aout_gnu.h.

#define N_BSSADDR (   x)    (N_DATADDR(x) + (x).a_data)

Definition at line 219 of file aout_gnu.h.

#define N_COMM   0x12 /* common (visible in shared lib commons) */

Definition at line 241 of file aout_gnu.h.

#define N_DATA   6

Definition at line 239 of file aout_gnu.h.

#define N_DATADDR (   x)
Value:
(N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) \
     :  (N_SEGSIZE(x) + ((N_TXTADDR(x)+(x).a_text-1) & ~(N_SEGSIZE(x)-1))))

Definition at line 213 of file aout_gnu.h.

#define N_DATOFF (   x)    ( N_TXTOFF(x) + (x).a_text )

Definition at line 188 of file aout_gnu.h.

#define N_DRELOFF (   x)    ( N_TRELOFF(x) + (x).a_trsize )

Definition at line 196 of file aout_gnu.h.

#define N_EXT   1

Definition at line 247 of file aout_gnu.h.

#define N_FLAGS (   exec)    (((exec).a_info >> 24) & 0xff)

Definition at line 131 of file aout_gnu.h.

#define N_FN   0x1F /* File name of a .o file */

Definition at line 242 of file aout_gnu.h.

#define N_INDR   0xa

Definition at line 260 of file aout_gnu.h.

#define N_MACHTYPE (   exec)    ((enum machine_type)(((exec).a_info >> 16) & 0xff))

Definition at line 130 of file aout_gnu.h.

#define N_MAGIC (   exec)    ((exec).a_info & 0xffff)

Definition at line 129 of file aout_gnu.h.

#define N_SEGSIZE (   x)    SEGMENT_SIZE

Definition at line 173 of file aout_gnu.h.

#define N_SET_FLAGS (   exec,
  flags 
)
Value:
((exec).a_info = \
     ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))

Definition at line 143 of file aout_gnu.h.

#define N_SET_INFO (   exec,
  magic,
  type,
  flags 
)
Value:
((exec).a_info = ((magic) & 0xffff) \
     | (((int)(type) & 0xff) << 16) \
     | (((flags) & 0xff) << 24))

Definition at line 132 of file aout_gnu.h.

#define N_SET_MACHTYPE (   exec,
  machtype 
)
Value:
((exec).a_info = \
     ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))

Definition at line 139 of file aout_gnu.h.

#define N_SET_MAGIC (   exec,
  magic 
)    ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))

Definition at line 136 of file aout_gnu.h.

#define N_SETA   0x14 /* Absolute set element symbol */

Definition at line 274 of file aout_gnu.h.

#define N_SETB   0x1A /* Bss set element symbol */

Definition at line 277 of file aout_gnu.h.

#define N_SETD   0x18 /* Data set element symbol */

Definition at line 276 of file aout_gnu.h.

#define N_SETT   0x16 /* Text set element symbol */

Definition at line 275 of file aout_gnu.h.

#define N_SETV   0x1C /* Pointer to set vector in data area. */

Definition at line 280 of file aout_gnu.h.

#define N_STAB   0340

Definition at line 249 of file aout_gnu.h.

#define N_STROFF (   x)    ( N_SYMOFF(x) + (x).a_syms )

Definition at line 204 of file aout_gnu.h.

#define N_SYMOFF (   x)    ( N_DRELOFF(x) + (x).a_drsize )

Definition at line 200 of file aout_gnu.h.

#define N_TEXT   4

Definition at line 238 of file aout_gnu.h.

#define N_TRELOFF (   x)    ( N_DATOFF(x) + (x).a_data )

Definition at line 192 of file aout_gnu.h.

#define N_TXTADDR (   x)    (N_MAGIC(x)==OMAGIC? 0 : TEXT_START_ADDR)

Definition at line 161 of file aout_gnu.h.

#define N_TXTOFF (   x)
Value:
(N_MAGIC(x) == ZMAGIC ?     \
                      _N_HDROFF((x)) + sizeof (struct exec) :  \
                      sizeof (struct exec))

Definition at line 182 of file aout_gnu.h.

#define N_TYPE   036

Definition at line 248 of file aout_gnu.h.

#define N_UNDF   0

Definition at line 236 of file aout_gnu.h.

#define N_WARNING   0x1e

Definition at line 286 of file aout_gnu.h.

#define N_WEAKA   0x0e /* Weak absolute symbol. */

Definition at line 294 of file aout_gnu.h.

#define N_WEAKB   0x11 /* Weak bss symbol. */

Definition at line 297 of file aout_gnu.h.

#define N_WEAKD   0x10 /* Weak data symbol. */

Definition at line 296 of file aout_gnu.h.

#define N_WEAKT   0x0f /* Weak text symbol. */

Definition at line 295 of file aout_gnu.h.

#define N_WEAKU   0x0d /* Weak undefined symbol. */

Definition at line 293 of file aout_gnu.h.

#define NMAGIC   0410

Definition at line 152 of file aout_gnu.h.

#define OMAGIC   0407

Definition at line 149 of file aout_gnu.h.

#define RELOC_STD_BITS_BASEREL_BIG   0x08

Definition at line 398 of file aout_gnu.h.

#define RELOC_STD_BITS_BASEREL_LITTLE   0x08

Definition at line 399 of file aout_gnu.h.

#define RELOC_STD_BITS_EXTERN_BIG   0x10

Definition at line 395 of file aout_gnu.h.

#define RELOC_STD_BITS_EXTERN_LITTLE   0x08

Definition at line 396 of file aout_gnu.h.

#define RELOC_STD_BITS_JMPTABLE_BIG   0x04

Definition at line 401 of file aout_gnu.h.

#define RELOC_STD_BITS_JMPTABLE_LITTLE   0x04

Definition at line 402 of file aout_gnu.h.

#define RELOC_STD_BITS_LENGTH_BIG   0x60

Definition at line 390 of file aout_gnu.h.

#define RELOC_STD_BITS_LENGTH_LITTLE   0x06

Definition at line 392 of file aout_gnu.h.

#define RELOC_STD_BITS_LENGTH_SH_BIG   5 /* To shift to units place */

Definition at line 391 of file aout_gnu.h.

Definition at line 393 of file aout_gnu.h.

#define RELOC_STD_BITS_PCREL_BIG   0x80

Definition at line 387 of file aout_gnu.h.

#define RELOC_STD_BITS_PCREL_LITTLE   0x01

Definition at line 388 of file aout_gnu.h.

#define RELOC_STD_BITS_RELATIVE_BIG   0x02

Definition at line 404 of file aout_gnu.h.

#define RELOC_STD_BITS_RELATIVE_LITTLE   0x02

Definition at line 405 of file aout_gnu.h.

#define RELOC_STD_SIZE   8 /* Bytes per relocation entry */

Definition at line 407 of file aout_gnu.h.

#define USE_EXTENDED_RELOC   defined(TC_SPARC)

Definition at line 35 of file aout_gnu.h.

#define ZMAGIC   0413

Definition at line 154 of file aout_gnu.h.


Enumeration Type Documentation

Enumerator:
M_UNKNOWN 
M_68010 
M_68020 
M_SPARC 
M_NS32032 
M_NS32532 
M_386 
M_29K 
M_386_DYNIX 
M_ARM 
M_SPARCLET 
M_386_NETBSD 
M_68K_NETBSD 
M_68K4K_NETBSD 
M_532_NETBSD 
M_SPARC_NETBSD 
M_PMAX_NETBSD 
M_VAX_NETBSD 
M_ALPHA_NETBSD 
M_ARM6_NETBSD 
M_SPARCLET_1 
M_POWERPC_NETBSD 
M_VAX4K_NETBSD 
M_MIPS1 
M_MIPS2 
M_88K_OPENBSD 
M_HPPA_OPENBSD 
M_SPARC64_NETBSD 
M_X86_64_NETBSD 
M_SPARCLET_2 
M_SPARCLET_3 
M_SPARCLET_4 
M_HP200 
M_HP300 
M_HPUX 
M_SPARCLET_5 
M_SPARCLET_6 
M_SPARCLITE_LE 
M_CRIS 
M_UNKNOWN 
M_68010 
M_68020 
M_SPARC 
M_386 
M_29K 
M_RS6000 
M_VAX4K_NETBSD 
M_HP200 
M_HP300 
M_HPUX23 

Definition at line 112 of file aout_gnu.h.

  {
    M_UNKNOWN = 0,
    M_68010 = 1,
    M_68020 = 2,
    M_SPARC = 3,
    /* skip a bunch so we don't run into any of sun's numbers */
    M_386 = 100,
    M_29K = 101,
    M_RS6000 = 102,         /* IBM RS/6000 */
    M_VAX4K_NETBSD = 150,
    /* HP/BSD formats */
    M_HP200 = 200,          /* hp200 (68010) BSD binary */
    M_HP300 = 300,          /* hp300 (68020+68881) BSD binary */
    M_HPUX23 = 0x020C              /* hp200/300 HPUX binary */
  };