|
|
1.1 ! root 1: /* ! 2: * static char ID_filhdrh[] = "@(#)filehdr.h 1.8.1.2 6/13/84"; ! 3: */ ! 4: ! 5: struct filehdr { ! 6: unsigned short f_magic; /* magic number */ ! 7: unsigned short f_nscns; /* number of sections */ ! 8: long f_timdat; /* time & date stamp */ ! 9: long f_symptr; /* file pointer to symtab */ ! 10: long f_nsyms; /* number of symtab entries */ ! 11: unsigned short f_opthdr; /* sizeof(optional hdr) */ ! 12: unsigned short f_flags; /* flags */ ! 13: }; ! 14: ! 15: ! 16: /* ! 17: * Bits for f_flags: ! 18: * ! 19: * F_RELFLG relocation info stripped from file ! 20: * F_EXEC file is executable (i.e. no unresolved ! 21: * externel references) ! 22: * F_LNNO line nunbers stripped from file ! 23: * F_LSYMS local symbols stripped from file ! 24: * F_MINMAL this is a minimal object file (".m") output of fextract ! 25: * F_UPDATE this is a fully bound update file, output of ogen ! 26: * F_SWABD this file has had its bytes swabbed (in names) ! 27: * F_AR16WR this file has the byte ordering of an AR16WR (e.g. 11/70) machine ! 28: * (it was created there, or was produced by conv) ! 29: * F_AR32WR this file has the byte ordering of an AR32WR machine(e.g. vax) ! 30: * F_AR32W this file has the byte ordering of an AR32W machine (e.g. 3b,maxi) ! 31: * F_PATCH file contains "patch" list in optional header ! 32: * F_NODF (minimal file only) no decision functions for ! 33: * replaced functions ! 34: */ ! 35: ! 36: #define F_RELFLG 0000001 ! 37: #define F_EXEC 0000002 ! 38: #define F_LNNO 0000004 ! 39: #define F_LSYMS 0000010 ! 40: #define F_MINMAL 0000020 ! 41: #define F_UPDATE 0000040 ! 42: #define F_SWABD 0000100 ! 43: #define F_AR16WR 0000200 ! 44: #define F_AR32WR 0000400 ! 45: #define F_AR32W 0001000 ! 46: #define F_PATCH 0002000 ! 47: #define F_NODF 0002000 ! 48: ! 49: /* ! 50: * BELLMAC-32 Identification field ! 51: * F_BM32B file contains BM32B code (as opposed to strictly BM32A) ! 52: */ ! 53: #define F_BM32ID 0160000 ! 54: #define F_BM32B 0020000 ! 55: #define F_BM32RST 0010000 ! 56: ! 57: /* ! 58: * Magic Numbers ! 59: */ ! 60: ! 61: /* Basic-16 */ ! 62: ! 63: #define B16MAGIC 0502 ! 64: #define BTVMAGIC 0503 ! 65: ! 66: /* x86 */ ! 67: ! 68: #define X86MAGIC 0510 ! 69: #define XTVMAGIC 0511 ! 70: ! 71: /* n3b */ ! 72: /* ! 73: * NOTE: For New 3B, the old values of magic numbers ! 74: * will be in the optional header in the structure ! 75: * "aouthdr" (identical to old 3B aouthdr). ! 76: */ ! 77: #define N3BMAGIC 0550 ! 78: #define NTVMAGIC 0551 ! 79: ! 80: /* XL */ ! 81: #define XLMAGIC 0540 ! 82: ! 83: /* MAC-32 3b-5 */ ! 84: ! 85: #define FBOMAGIC 0560 ! 86: #define RBOMAGIC 0562 ! 87: #define MTVMAGIC 0561 ! 88: ! 89: ! 90: /* VAX 11/780 and VAX 11/750 */ ! 91: ! 92: /* writeable text segments */ ! 93: #define VAXWRMAGIC 0570 ! 94: /* readonly sharable text segments */ ! 95: #define VAXROMAGIC 0575 ! 96: ! 97: ! 98: /* Motorola 68000 */ ! 99: #define MC68MAGIC 0520 ! 100: #define MC68TVMAGIC 0521 ! 101: #define M68MAGIC 0210 ! 102: #define M68TVMAGIC 0211 ! 103: ! 104: ! 105: /* IBM 370 */ ! 106: #define U370WRMAGIC 0530 /* writeble text segments */ ! 107: #define U370ROMAGIC 0535 /* readonly sharable text segments */ ! 108: ! 109: #define FILHDR struct filehdr ! 110: #define FILHSZ sizeof(FILHDR) ! 111: ! 112: #define ISCOFF(x) \ ! 113: (((x)==B16MAGIC) || ((x)==BTVMAGIC) || ((x)==X86MAGIC) \ ! 114: || ((x)==XTVMAGIC) || ((x)==N3BMAGIC) || ((x)==NTVMAGIC) \ ! 115: || ((x)==FBOMAGIC) || ((x)==VAXROMAGIC) || ((x)==VAXWRMAGIC) \ ! 116: || ((x)==XLMAGIC) || ((x)==RBOMAGIC) || ((x)==MC68TVMAGIC) \ ! 117: || ((x)==MC68MAGIC) || ((x)==M68MAGIC) || ((x)==M68TVMAGIC) \ ! 118: || ((x)==U370WRMAGIC) || ((x)==U370ROMAGIC) || ((x)==MTVMAGIC))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.