Mercurial > hg-old > index.cgi
comparison lwlink/link.c @ 173:0395e6fd67e9
Fixed stupid errors with changes for archive handling
author | lost |
---|---|
date | Mon, 02 Mar 2009 04:13:49 +0000 |
parents | d610b8aef91b |
children | 220a760ec654 |
comparison
equal
deleted
inserted
replaced
172:47427342e41d | 173:0395e6fd67e9 |
---|---|
50 fn -> sections[sn].loadaddress = *base; | 50 fn -> sections[sn].loadaddress = *base; |
51 *base += fn -> sections[sn].codesize; | 51 *base += fn -> sections[sn].codesize; |
52 nsects++; | 52 nsects++; |
53 } | 53 } |
54 } | 54 } |
55 for (sn = 0; sn < fn -> nsubs; fn++) | 55 for (sn = 0; sn < fn -> nsubs; sn++) |
56 { | 56 { |
57 check_section_name(name, base, fn -> subs[sn]); | 57 check_section_name(name, base, fn -> subs[sn]); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
77 // we have a match - now collect *all* sections of the same name! | 77 // we have a match - now collect *all* sections of the same name! |
78 add_matching_sections(fn -> sections[sn].name, 0, 0, base); | 78 add_matching_sections(fn -> sections[sn].name, 0, 0, base); |
79 | 79 |
80 // and then continue looking for sections | 80 // and then continue looking for sections |
81 } | 81 } |
82 for (sn = 0; sn < fn -> nsubs; fn++) | 82 for (sn = 0; sn < fn -> nsubs; sn++) |
83 { | 83 { |
84 check_section_flags(yesflags, noflags, base, fn -> subs[sn]); | 84 check_section_flags(yesflags, noflags, base, fn -> subs[sn]); |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
271 } | 271 } |
272 else | 272 else |
273 { | 273 { |
274 // external symbol | 274 // external symbol |
275 // read all files in order until found (or not found) | 275 // read all files in order until found (or not found) |
276 for (fp = sect -> file; fp; fp = fp -> parent) | 276 if (sect) |
277 { | 277 { |
278 s = find_external_sym_recurse(sym, fp); | 278 for (fp = sect -> file; fp; fp = fp -> parent) |
279 if (s) | 279 { |
280 return s; | 280 s = find_external_sym_recurse(sym, fp); |
281 if (s) | |
282 return s; | |
283 } | |
281 } | 284 } |
282 | 285 |
283 for (fn = 0; fn < ninputfiles; fn++) | 286 for (fn = 0; fn < ninputfiles; fn++) |
284 { | 287 { |
285 s = find_external_sym_recurse(sym, inputfiles[fn]); | 288 s = find_external_sym_recurse(sym, inputfiles[fn]); |