scc

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

coff32.h (1329B)


      1 #include <scc/coff32/filehdr.h>
      2 #include <scc/coff32/aouthdr.h>
      3 #include <scc/coff32/scnhdr.h>
      4 #include <scc/coff32/syms.h>
      5 #include <scc/coff32/reloc.h>
      6 #include <scc/coff32/linenum.h>
      7 
      8 typedef struct coff32 Coff32;
      9 
     10 struct coff32 {
     11 	FILHDR hdr;
     12 	AOUTHDR aout;
     13 	SCNHDR *scns;
     14 	SYMENT *ents;
     15 	RELOC **rels;
     16 	LINENO **lines;
     17 	char *strtbl;
     18 	unsigned long strsiz;
     19 };
     20 
     21 struct arch {
     22 	char *name;
     23 	unsigned char magic[2];
     24 	int type;
     25 	int flags;
     26 };
     27 
     28 extern int coff32new(Obj *, int);
     29 extern int coff32read(Obj *, FILE *);
     30 extern int coff32setidx(long, char **, long *, FILE *);
     31 extern int coff32getidx(long *, char ***, long **, FILE *);
     32 extern int coff32pc2line(Obj *, unsigned long long, char *, int *);
     33 extern int coff32strip(Obj *);
     34 extern void coff32del(Obj *);
     35 extern int coff32write(Obj *, Map *, FILE *);
     36 extern int coff32probe(unsigned char *, char **);
     37 extern int coff32type(char *);
     38 
     39 extern int coff32xsetidx(int, long , char *[], long[], FILE *);
     40 extern int coff32xgetidx(int, long *, char ***, long **, FILE *);
     41 
     42 extern Symbol *coff32getsym(Obj *, int *, Symbol *);
     43 extern Symbol *coff32setsym(Obj *, int *, Symbol *);
     44 extern Section *coff32getsec(Obj *, int *, Section *);
     45 extern Section *coff32setsec(Obj *, int *, Section *);
     46 extern Map *coff32loadmap(Obj *, FILE *);
     47 
     48 
     49 /* globals */
     50 extern struct arch coff32archs[];