comparison lwlink/lwlink.h @ 234:d389adbcc4ab

Added section base and length symbols to lwlink Added the ability for a link script to define section base and section length symbols when linking. These symbols are searched for when an external reference is resolved before looking up any symbols in the various objects being linked. Also documented the new link script directives and added such directives to all default link scripts.
author William Astle <lost@l-w.ca>
date Fri, 10 Aug 2012 23:47:56 -0600
parents c6a38fd8bd33
children ce1fdc8d6568
comparison
equal deleted inserted replaced
233:7887a48b74df 234:d389adbcc4ab
155 int modtype; // module type 155 int modtype; // module type
156 int modlang; // module language 156 int modlang; // module language
157 int modattr; // module attributes 157 int modattr; // module attributes
158 int modrev; // module revision 158 int modrev; // module revision
159 char *name; // module name 159 char *name; // module name
160 char *basesympat; // pattern for section base symbol (%s for section name)
161 char *lensympat; // pattern for section length symbol (%s for section name)
160 } linkscript_t; 162 } linkscript_t;
161 163
162 #ifndef __script_c_seen__ 164 #ifndef __script_c_seen__
163 extern linkscript_t linkscript; 165 extern linkscript_t linkscript;
164 #endif 166 #endif
165 167
168 typedef struct symlist_s symlist_t;
169
170 struct symlist_s
171 {
172 char *sym;
173 int val;
174 symlist_t *next;
175
176 };
177
178 extern symlist_t *symlist;
179
166 #endif //__lwlink_h_seen__ 180 #endif //__lwlink_h_seen__