Mercurial > hg-old > index.cgi
comparison lwlink/link.c @ 395:54499b799779
Q&D sanitization of symbols in map files and error messages in lwlink
author | lost@l-w.ca |
---|---|
date | Fri, 23 Jul 2010 16:40:51 -0600 |
parents | 1c31e9005ff7 |
children |
comparison
equal
deleted
inserted
replaced
394:a2f52e97b454 | 395:54499b799779 |
---|---|
284 } | 284 } |
285 } | 285 } |
286 } | 286 } |
287 // not found | 287 // not found |
288 symerr = 1; | 288 symerr = 1; |
289 fprintf(stderr, "Local symbol %s not found in %s:%s\n", sym, sect -> file -> filename, sect -> name); | 289 fprintf(stderr, "Local symbol %s not found in %s:%s\n", sanitize_symbol(sym), sect -> file -> filename, sect -> name); |
290 goto outerr; | 290 goto outerr; |
291 } | 291 } |
292 else | 292 else |
293 { | 293 { |
294 // external symbol | 294 // external symbol |
309 if (s) | 309 if (s) |
310 return s; | 310 return s; |
311 } | 311 } |
312 if (sect) | 312 if (sect) |
313 { | 313 { |
314 fprintf(stderr, "External symbol %s not found in %s:%s\n", sym, sect -> file -> filename, sect -> name); | 314 fprintf(stderr, "External symbol %s not found in %s:%s\n", sanitize_symbol(sym), sect -> file -> filename, sect -> name); |
315 } | 315 } |
316 else | 316 else |
317 { | 317 { |
318 fprintf(stderr, "External symbol %s not found\n", sym); | 318 fprintf(stderr, "External symbol %s not found\n", sym); |
319 } | 319 } |
412 lw_expr_stack_t *s; | 412 lw_expr_stack_t *s; |
413 | 413 |
414 s = resolve_sym(linkscript.execsym, 0, NULL); | 414 s = resolve_sym(linkscript.execsym, 0, NULL); |
415 if (!s) | 415 if (!s) |
416 { | 416 { |
417 fprintf(stderr, "Cannot resolve exec address '%s'\n", linkscript.execsym); | 417 fprintf(stderr, "Cannot resolve exec address '%s'\n", sanitize_symbol(linkscript.execsym)); |
418 symerr = 1; | 418 symerr = 1; |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 do | 422 do |