scc

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

scnhdr.h (1167B)


      1 /* This file is inspired in the book "Understanding and using COFF" */
      2 
      3 #define SCNNMLEN 8
      4 
      5 struct scnhdr {
      6 	char s_name[SCNNMLEN];    /* section name */
      7 	long s_paddr;             /* physical address */
      8 	long s_vaddr;             /* virtual address */
      9 	long s_size;              /* section size */
     10 	long s_scnptr;            /* file ptr to raw data */
     11 	long s_relptr;            /* file ptr to relo info */
     12 	long s_lnnoptr;           /* file ptr to line number */
     13 	unsigned short s_nrelloc; /* number of relocation entries */
     14 	unsigned short s_nlnno;   /* number of lines entries */
     15 	long s_flags;             /* type and content flags */
     16 };
     17 
     18 #define SCNHDR struct scnhdr
     19 #define SCNHSZ 40
     20 
     21 
     22 #define STYP_REG        0x00
     23 #define STYP_DSECT      0x01
     24 #define STYP_NOLOAD     0x02
     25 #define STYP_GROUP      0x04
     26 #define STYP_PAD        0x08
     27 #define STYP_COPY       0x10
     28 #define STYP_TEXT       0x20
     29 #define STYP_DATA       0x40
     30 #define STYP_BSS        0x80
     31 #define STYP_RDATA      0x100
     32 #define STYP_INFO       0x200
     33 #define STYP_OVER       0x400
     34 #define STYP_LIB        0x800
     35 #define STYP_MERGE      0x2000
     36 #define TYP_REVERSE_PAD 0x4000
     37 #define STYP_LIT        0x8020