Mercurial > hg > index.cgi
comparison lwlink/link.c @ 149:729a9c70934e
Fixed crash and bogus warning with os9 module target
author | lost@l-w.ca |
---|---|
date | Fri, 26 Aug 2011 23:36:00 -0600 |
parents | 08fb11004df9 |
children | 1571e150f1fd |
comparison
equal
deleted
inserted
replaced
148:08fb11004df9 | 149:729a9c70934e |
---|---|
498 find_section_by_name_once_aux(name, inputfiles[fn], &rval, &found); | 498 find_section_by_name_once_aux(name, inputfiles[fn], &rval, &found); |
499 } | 499 } |
500 if (found != 1) | 500 if (found != 1) |
501 { | 501 { |
502 rval = NULL; | 502 rval = NULL; |
503 fprintf(stderr, "Warning: multiple instances of section %s found; ignoring all of them which is probably not what you want\n", name); | 503 if (found > 1) |
504 fprintf(stderr, "Warning: multiple instances of section %s found; ignoring all of them which is probably not what you want\n", name); | |
504 } | 505 } |
505 return rval; | 506 return rval; |
506 } | 507 } |
507 | 508 |
508 void check_os9(void) | 509 void check_os9(void) |
535 if (s -> codesize > 0 && (s -> flags & SECTION_BSS) == 0 && s -> code[0] != 0) | 536 if (s -> codesize > 0 && (s -> flags & SECTION_BSS) == 0 && s -> code[0] != 0) |
536 { | 537 { |
537 linkscript.name = (char *)(s -> code); | 538 linkscript.name = (char *)(s -> code); |
538 } | 539 } |
539 | 540 |
540 for (sym = s -> localsyms; s; sym = sym -> next) | 541 for (sym = s -> localsyms; sym; sym = sym -> next) |
541 { | 542 { |
542 char *sm = (char *)(sym -> sym); | 543 char *sm = (char *)(sym -> sym); |
543 if (!strcasecmp(sm, "type")) | 544 if (!strcasecmp(sm, "type")) |
544 { | 545 { |
545 linkscript.modtype = sym -> offset; | 546 linkscript.modtype = sym -> offset; |