Mercurial > hg-old > index.cgi
comparison lwasm/output.c @ 377:55ed7d06b136
Fixed intersection internal references in object target
author | lost@starbug |
---|---|
date | Mon, 26 Apr 2010 18:37:06 -0600 |
parents | 91c0fe026940 |
children | a741d2e4869f |
comparison
equal
deleted
inserted
replaced
376:91c0fe026940 | 377:55ed7d06b136 |
---|---|
314 case lw_expr_type_special: | 314 case lw_expr_type_special: |
315 v = lw_expr_specint(e); | 315 v = lw_expr_specint(e); |
316 switch (v) | 316 switch (v) |
317 { | 317 { |
318 case lwasm_expr_secbase: | 318 case lwasm_expr_secbase: |
319 writebytes("\x05", 1, 1, of); | 319 { |
320 break; | 320 // replaced with a synthetic symbol |
321 | 321 sectiontab_t *se; |
322 se = lw_expr_specptr(e); | |
323 | |
324 writebytes("\x03\x02", 1, 1, of); | |
325 writebytes(se -> name, strlen(se -> name) + 1, 1, of); | |
326 break; | |
327 } | |
322 case lwasm_expr_import: | 328 case lwasm_expr_import: |
323 { | 329 { |
324 importlist_t *ie; | 330 importlist_t *ie; |
325 ie = lw_expr_specptr(e); | 331 ie = lw_expr_specptr(e); |
326 buf[0] = 0x02; | 332 buf[0] = 0x02; |
420 | 426 |
421 // indicate end of flags - the "" is NOT an error | 427 // indicate end of flags - the "" is NOT an error |
422 writebytes("", 1, 1, of); | 428 writebytes("", 1, 1, of); |
423 | 429 |
424 // now the local symbols | 430 // now the local symbols |
431 | |
432 // a symbol for section base address | |
433 writebytes("\x02", 1, 1, of); | |
434 writebytes(s -> name, strlen(s -> name) + 1, 1, of); | |
425 for (se = as -> symtab.head; se; se = se -> next) | 435 for (se = as -> symtab.head; se; se = se -> next) |
426 { | 436 { |
427 // ignore symbols not in this section | 437 // ignore symbols not in this section |
428 if (se -> section != s) | 438 if (se -> section != s) |
429 continue; | 439 continue; |