home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
Source
/
GNU
/
cctools
/
include
/
gnu
/
a.out.h
next >
Wrap
C/C++ Source or Header
|
1993-10-20
|
1KB
|
56 lines
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)a.out.h 5.1 (Berkeley) 5/30/85
*/
/*
* Definitions of the a.out header
* and magic numbers are shared with
* the kernel.
*/
#include <gnu/exec.h>
/*
* Macros which take exec structures as arguments and tell whether
* the file has a reasonable magic number or offsets to text|symbols|strings.
*/
#define N_BADMAG(x) \
(((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC)
#define N_TXTOFF(x) \
((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec))
#define N_SYMOFF(x) \
(N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize)
#define N_STROFF(x) \
(N_SYMOFF(x) + (x).a_syms)
#include "mach-o/reloc.h"
#ifdef M88K
#include "mach-o/m88k/reloc.h"
#endif
#ifdef M98K
#include "mach-o/m98k/reloc.h"
#endif
#ifdef I860
#include "mach-o/i860/reloc.h"
#endif
#ifdef HPPA
#include "mach-o/hppa/reloc.h"
#endif
#include "mach-o/nlist.h"
/* Things in other UNIX systems not in the NeXT version of nlist.h */
#define n_hash n_desc /* used internally by ld */
#define N_TEXT 0x4 /* text */
#define N_DATA 0x6 /* data */
#define N_BSS 0x8 /* bss */
#define N_COMM 0x12 /* common (internal to ld) */
#define N_FN 0x1f /* file name symbol */
/*
* Format for namelist values.
*/
#define N_FORMAT "%08x"