scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

filehdr.h (961B)


      1 /* This file is inspired in the book "Understanding and using COFF" */
      2 
      3 struct filehdr {
      4 	unsigned short f_magic;  /* magic number */
      5 	unsigned short f_nscns;  /* number of sections */
      6 	long f_timdat;           /* time stamp */
      7 	long f_symptr;           /* file pointer to symbols */
      8 	long f_nsyms;            /* number of symbols */
      9 	unsigned short f_opthdr; /* size of optional header */
     10 	unsigned short f_flags;  /* file flags */
     11 };
     12 
     13 #define FILHDR struct filehdr
     14 #define FILHSZ 20
     15 
     16 #define F_RELFLG          0000001
     17 #define F_EXEC            0000002
     18 #define F_LMNO            0000004
     19 #define F_LSYMS           0000010
     20 #define F_MINMAL          0000020
     21 #define F_UPDATE          0000040
     22 #define F_SWADB           0000100
     23 #define F_AR16WR          0000200
     24 #define F_AR32WR          0000400
     25 #define F_A32WR           0001000
     26 #define F_PATCH           0002000
     27 #define F_NODF            0002000
     28 
     29 #define COFF_I386MAGIC    0x014c
     30 #define COFF_Z80MAGIC     0x805a