scc

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

scnhdr.h (1095B)


      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 #define STYP_REG         0
     22 #define STYP_DSECT       (1 << 0)
     23 #define STYP_NOLOAD      (1 << 1)
     24 #define STYP_GROUP       (1 << 2)
     25 #define STYP_PAD         (1 << 3)
     26 #define STYP_COPY        (1 << 4)
     27 #define STYP_TEXT        (1 << 5)
     28 #define STYP_DATA        (1 << 6)
     29 #define STYP_BSS         (1 << 7)
     30 #define STYP_INFO        (1 << 9)
     31 #define STYP_OVER        (1 << 11)
     32 #define STYP_LIB         (1 << 12)