|
|
1.1 ! root 1: /* %M% %I% %E% */ ! 2: /* ! 3: * Header prepended to each a.out file. ! 4: */ ! 5: struct exec { ! 6: long a_magic; /* magic number */ ! 7: unsigned long a_text; /* size of text segment */ ! 8: unsigned long a_data; /* size of initialized data */ ! 9: unsigned long a_bss; /* size of uninitialized data */ ! 10: unsigned long a_syms; /* size of symbol table */ ! 11: unsigned long a_trsize; /* size of text relocation */ ! 12: unsigned long a_drsize; /* size of data relocation */ ! 13: unsigned long a_entry; /* entry point */ ! 14: }; ! 15: ! 16: #define OMAGIC 0407 /* old impure format */ ! 17: #define NMAGIC 0410 /* read-only text */ ! 18: #define ZMAGIC 0413 /* demand load format */ ! 19: ! 20: /* ! 21: * Macros which take exec structures as arguments and tell whether ! 22: * the file has a reasonable magic number or offsets to text|symbols|strings. ! 23: */ ! 24: #define N_BADMAG(x) \ ! 25: (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) ! 26: ! 27: #define N_TXTOFF(x) \ ! 28: ((x).a_magic==ZMAGIC ? 1024 : sizeof (struct exec)) ! 29: #define N_SYMOFF(x) \ ! 30: (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize) ! 31: #include <a.out.h>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.