coff32.h (1599B)
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 #include <scc/coff32/storclass.h> 8 9 enum { 10 SYM_ENT, 11 SYM_AUX_UNK, 12 SYM_AUX_SYM, 13 SYM_AUX_FILE, 14 SYM_AUX_SCN, 15 SYM_AUX_FUN, 16 SYM_AUX_ARY, 17 }; 18 19 typedef struct coff32 Coff32; 20 typedef struct entry Entry; 21 22 struct entry { 23 char type; 24 union { 25 SYMENT sym; 26 AUXENT aux; 27 unsigned char buf[AUXESZ]; 28 } u; 29 }; 30 31 struct coff32 { 32 FILHDR hdr; 33 AOUTHDR aout; 34 SCNHDR *scns; 35 Entry *ents; 36 RELOC **rels; 37 LINENO **lines; 38 char *strtbl; 39 unsigned long strsiz; 40 }; 41 42 struct arch { 43 char *name; 44 unsigned char magic[2]; 45 int type; 46 int flags; 47 }; 48 49 extern int coff32new(Obj *, int); 50 extern int coff32read(Obj *, FILE *); 51 extern int coff32setidx(long, char **, long *, FILE *); 52 extern int coff32getidx(long *, char ***, long **, FILE *); 53 extern int coff32pc2line(Obj *, unsigned long long, char *, int *); 54 extern int coff32strip(Obj *); 55 extern void coff32del(Obj *); 56 extern int coff32write(Obj *, Map *, FILE *); 57 extern int coff32probe(unsigned char *, char **); 58 extern int coff32type(char *); 59 60 extern int coff32xsetidx(int, long , char *[], long[], FILE *); 61 extern int coff32xgetidx(int, long *, char ***, long **, FILE *); 62 63 extern Symbol *coff32getsym(Obj *, int *, Symbol *); 64 extern Symbol *coff32setsym(Obj *, int *, Symbol *); 65 extern Section *coff32getsec(Obj *, int *, Section *); 66 extern Section *coff32setsec(Obj *, int *, Section *); 67 extern Map *coff32loadmap(Obj *, FILE *); 68 69 70 /* globals */ 71 extern struct arch coff32archs[];