175 |
#include SPECIAL_BFD_INCLUDE |
#include SPECIAL_BFD_INCLUDE |
176 |
#endif |
#endif |
177 |
|
|
178 |
|
object sSAlinker_symbol_packageA; |
179 |
|
DEFVAR("*LINK-HASH-TABLE*",sSAlink_hash_tableA,SI,((object)&Cnil_body),""); |
180 |
|
|
181 |
int |
int |
182 |
fasload(object faslfile) { |
fasload(object faslfile) { |
183 |
|
|
256 |
*entry_name=bfd_get_symbol_leading_char(b); |
*entry_name=bfd_get_symbol_leading_char(b); |
257 |
entry_name_ptr=*entry_name ? entry_name : entry_name+1; |
entry_name_ptr=*entry_name ? entry_name : entry_name+1; |
258 |
|
|
259 |
for (u=0;u<v;u++) { |
{ |
260 |
|
struct string st; |
261 |
struct bfd_link_hash_entry *h; |
memset(&st,0,sizeof(st)); |
262 |
|
st.t=t_string; |
263 |
|
|
264 |
if (!strncmp(entry_name_ptr,q[u]->name,5)) { |
for (u=0;u<v;u++) { |
265 |
init_address=u; |
|
266 |
continue; |
struct bfd_link_hash_entry *h; |
267 |
} |
|
268 |
|
if (!strncmp(entry_name_ptr,q[u]->name,5)) { |
269 |
|
init_address=u; |
270 |
|
continue; |
271 |
|
} |
272 |
|
|
273 |
|
if (link_info.hash) { |
274 |
|
|
275 |
if (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_FALSE,MY_BFD_FALSE,MY_BFD_TRUE))) |
if (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_FALSE,MY_BFD_FALSE,MY_BFD_TRUE))) |
276 |
continue; |
continue; |
277 |
|
|
278 |
if (h->type!=bfd_link_hash_defined) |
if (h->type!=bfd_link_hash_defined) |
279 |
FEerror("Undefined symbol ~S",1,make_simple_string(q[u]->name)); |
FEerror("Undefined symbol ~S",1,make_simple_string(q[u]->name)); |
280 |
|
|
281 |
if (h->u.def.section) { |
if (h->u.def.section) { |
282 |
q[u]->value=h->u.def.value+h->u.def.section->vma; |
q[u]->value=h->u.def.value+h->u.def.section->vma; |
283 |
q[u]->flags|=BSF_WEAK; |
q[u]->flags|=BSF_WEAK; |
284 |
} else |
} else |
285 |
FEerror("Symbol without section",0); |
FEerror("Symbol without section",0); |
286 |
|
|
287 |
|
} else { |
288 |
|
|
289 |
|
struct htent *x; |
290 |
|
|
291 |
|
st.st_self=(char *)q[u]->name; |
292 |
|
st.st_fillp=st.st_dim=strlen(st.st_self); |
293 |
|
if ((x=gethash((object)&st,sSAlink_hash_tableA->s.s_dbind))->hte_key==OBJNULL) |
294 |
|
continue; |
295 |
|
|
296 |
|
q[u]->value=fix(x->hte_value); |
297 |
|
q[u]->flags|=BSF_WEAK; |
298 |
|
|
299 |
|
} |
300 |
|
|
301 |
|
} |
302 |
|
|
303 |
} |
} |
304 |
|
|