scc

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

coff32.h (1310B)


      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 arch {
     11 	char *name;
     12 	unsigned char magic[2];
     13 	int type;
     14 };
     15 
     16 struct coff32 {
     17 	FILHDR hdr;
     18 	AOUTHDR aout;
     19 	SCNHDR *scns;
     20 	SYMENT *ents;
     21 	RELOC **rels;
     22 	LINENO **lines;
     23 	char *strtbl;
     24 	unsigned long strsiz;
     25 };
     26 
     27 extern int coff32new(Obj *obj);
     28 extern int coff32read(Obj *obj, FILE *fp);
     29 extern int coff32setidx(long nsyms, char **names, long *offs, FILE *fp);
     30 extern int coff32getidx(long *nsyms, char ***namep, long **offsp, FILE *fp);
     31 extern int coff32pc2line(Obj *, unsigned long long , char *, int *);
     32 extern int coff32strip(Obj *obj);
     33 extern void coff32del(Obj *obj);
     34 extern int coff32write(Obj *obj, Map * map, FILE *fp);
     35 extern int coff32probe(unsigned char *buf, char **name);
     36 
     37 extern int coff32xsetidx(int order,
     38                          long nsymbols, char *names[], long offs[], FILE *fp);
     39 extern int coff32xgetidx(int order,
     40                          long *nsyms, char ***namep, long **offsp, FILE *fp);
     41 
     42 extern Symbol *coff32getsym(Obj *obj, int *idx, Symbol *sym);
     43 extern Section *coff32getsec(Obj *obj, int *idx, Section *sec);
     44 extern Map *coff32loadmap(Obj *obj, FILE *fp);