Commit | Line | Data |
---|---|---|
caf79156 KT |
1 | struct exec { /* a.out header */ |
2 | int a_magic; /* magic number */ | |
3 | unsigned a_text; /* size of text segment */ | |
4 | unsigned a_data; /* size of initialized data */ | |
5 | unsigned a_bss; /* size of unitialized data */ | |
6 | unsigned a_syms; /* size of symbol table */ | |
7 | unsigned a_entry; /* entry point */ | |
8 | unsigned a_unused; /* not used */ | |
9 | unsigned a_flag; /* relocation info stripped */ | |
10 | }; | |
11 | ||
12 | #define A_MAGIC1 0407 /* normal */ | |
13 | #define A_MAGIC2 0410 /* read-only text */ | |
14 | #define A_MAGIC3 0411 /* separated I&D */ | |
15 | #define A_MAGIC4 0405 /* overlay */ | |
16 | ||
17 | struct nlist { /* symbol table entry */ | |
18 | char n_name[8]; /* symbol name */ | |
19 | int n_type; /* type flag */ | |
20 | unsigned n_value; /* value */ | |
21 | }; | |
22 | ||
23 | /* values for type flag */ | |
24 | #define N_UNDF 0 /* undefined */ | |
25 | #define N_ABS 01 /* absolute */ | |
26 | #define N_TEXT 02 /* text symbol */ | |
27 | #define N_DATA 03 /* data symbol */ | |
28 | #define N_BSS 04 /* bss symbol */ | |
29 | #define N_TYPE 037 | |
30 | #define N_REG 024 /* register name */ | |
31 | #define N_FN 037 /* file name symbol */ | |
32 | #define N_EXT 040 /* external bit, or'ed in */ | |
33 | #define FORMAT "%06o" /* to print a value */ |