Mercurial > hg-old > index.cgi
comparison src/script.c @ 303:13272197d278
Added simplistic output module for DECB target
author | lost |
---|---|
date | Thu, 22 Jan 2009 02:05:08 +0000 |
parents | 376cc55361c7 |
children | be1abc4ac114 |
comparison
equal
deleted
inserted
replaced
302:eff969272fb9 | 303:13272197d278 |
---|---|
37 static char *decb_script = | 37 static char *decb_script = |
38 "section init load at 2000\n" | 38 "section init load at 2000\n" |
39 "section code\n" | 39 "section code\n" |
40 "section *,!bss\n" | 40 "section *,!bss\n" |
41 "section *,bss\n" | 41 "section *,bss\n" |
42 "entry 2000\n" | |
42 ; | 43 ; |
43 | 44 |
44 // the built-in RAW target linker script | 45 // the built-in RAW target linker script |
45 static char *raw_script = | 46 static char *raw_script = |
46 "section init load at 0000\n" | 47 "section init load at 0000\n" |
156 // parse the hex number and stow it | 157 // parse the hex number and stow it |
157 linkscript.padsize = strtol(ptr, NULL, 16); | 158 linkscript.padsize = strtol(ptr, NULL, 16); |
158 if (linkscript.padsize < 0) | 159 if (linkscript.padsize < 0) |
159 linkscript.padsize = 0; | 160 linkscript.padsize = 0; |
160 } | 161 } |
162 else if (!strcmp(line, "entry")) | |
163 { | |
164 int eaddr; | |
165 | |
166 eaddr = strtol(ptr, &ptr2, 16); | |
167 if (*ptr2) | |
168 { | |
169 linkscript.execaddr = -1; | |
170 linkscript.execsym = lw_strdup(ptr); | |
171 } | |
172 else | |
173 { | |
174 linkscript.execaddr = eaddr; | |
175 linkscript.execsym = NULL; | |
176 } | |
177 } | |
161 else if (!strcmp(line, "section")) | 178 else if (!strcmp(line, "section")) |
162 { | 179 { |
163 // section | 180 // section |
164 // parse out the section name and flags | 181 // parse out the section name and flags |
165 for (ptr2 = ptr; *ptr2 && !isspace(*ptr2); ptr2++) | 182 for (ptr2 = ptr; *ptr2 && !isspace(*ptr2); ptr2++) |