|
|
1.1 root 1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)a.out.h 5.1 (Berkeley) 5/30/85
7: */
8:
9: /*
10: * Definitions of the a.out header
11: * and magic numbers are shared with
12: * the kernel.
13: */
14: #include <gnu/exec.h>
15:
16: /*
17: * Macros which take exec structures as arguments and tell whether
18: * the file has a reasonable magic number or offsets to text|symbols|strings.
19: */
20: #define N_BADMAG(x) \
21: (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC)
22:
23: #define N_TXTOFF(x) \
24: ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec))
25: #define N_SYMOFF(x) \
26: (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize)
27: #define N_STROFF(x) \
28: (N_SYMOFF(x) + (x).a_syms)
29:
30: #include "mach-o/reloc.h"
31: #ifdef M88K
32: #include "mach-o/m88k/reloc.h"
33: #endif
34: #ifdef M98K
35: #include "mach-o/m98k/reloc.h"
36: #endif
37: #ifdef I860
38: #include "mach-o/i860/reloc.h"
39: #endif
40: #ifdef HPPA
41: #include "mach-o/hppa/reloc.h"
42: #endif
43:
44: #include "mach-o/nlist.h"
45: /* Things in other UNIX systems not in the NeXT version of nlist.h */
46: #define n_hash n_desc /* used internally by ld */
47: #define N_TEXT 0x4 /* text */
48: #define N_DATA 0x6 /* data */
49: #define N_BSS 0x8 /* bss */
50: #define N_COMM 0x12 /* common (internal to ld) */
51: #define N_FN 0x1f /* file name symbol */
52: /*
53: * Format for namelist values.
54: */
55: #define N_FORMAT "%08x"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.