comparison src/lwlink.h @ 301:376cc55361c7

section order and address resolution done
author lost
date Wed, 21 Jan 2009 05:45:25 +0000
parents 48945dac8178
children eff969272fb9
comparison
equal deleted inserted replaced
300:48945dac8178 301:376cc55361c7
44 int offset; // where in the section 44 int offset; // where in the section
45 lw_expr_stack_t *expr; // the expression to calculate it 45 lw_expr_stack_t *expr; // the expression to calculate it
46 reloc_t *next; // ptr to next relocation 46 reloc_t *next; // ptr to next relocation
47 }; 47 };
48 48
49 typedef struct fileinfo_s fileinfo_t;
50
49 #define SECTION_BSS 1 51 #define SECTION_BSS 1
50 typedef struct 52 typedef struct
51 { 53 {
52 unsigned char *name; // name of the section 54 unsigned char *name; // name of the section
53 int flags; // section flags 55 int flags; // section flags
54 int codesize; // size of the code 56 int codesize; // size of the code
55 unsigned char *code; // pointer to the code 57 unsigned char *code; // pointer to the code
56 int loadaddress; // the actual load address of the section 58 int loadaddress; // the actual load address of the section
57 59 int processed; // was the section processed yet?
60
58 symtab_t *localsyms; // local symbol table 61 symtab_t *localsyms; // local symbol table
59 symtab_t *exportedsyms; // exported symbols table 62 symtab_t *exportedsyms; // exported symbols table
60 63
61 reloc_t *incompletes; // table of incomplete references 64 reloc_t *incompletes; // table of incomplete references
65
66 fileinfo_t *file; // the file we are in
62 } section_t; 67 } section_t;
63 68
64 typedef struct 69 struct fileinfo_s
65 { 70 {
66 char *filename; 71 char *filename;
67 unsigned char *filedata; 72 unsigned char *filedata;
68 long filesize; 73 long filesize;
69 section_t *sections; 74 section_t *sections;
70 int nsections; 75 int nsections;
71 76
72 } fileinfo_t; 77 };
73 78
74 79
75 80
76 #ifndef __lwlink_c_seen__ 81 #ifndef __lwlink_c_seen__
77 82