Jul. 8th, 2010 11:18 pm
I did a stupid thing
joshua@escape:~/blargcpu$ cat l5test.l5
extern int printchar(i: int);
int main () {
var cur: int;
for (cur = 0x41; cur < 0x5B; cur++)
printchar(cur);
printchar(0x0A);
return 0;
}
joshua@escape:~/blargcpu$ make l5test.bin
snipe/bin/snipe l5test.l5
blarg-elf-as -ol5test.o l5test.s
blarg-elf-ld -T blargcpu.ld -ol5test.elf l5test.o l5rt.o
blarg-elf-ld: l5test.elf: warning: allocated section `.text' not in segment
blarg-elf-objcopy -Obinary l5test.elf l5test.bin
joshua@escape:~/blargcpu$ ./blargcpu -r l5test.bin
blargcpu> cont
ABCDEFGHIJKLMNOPQRSTUVWXYZ
^C hit; breaking into debugger
blargcpu> q
Bye.
joshua@escape:~/blargcpu$(snipe is the evolution of the L5 compiler that
I'll dump code in git sooner or later. The barrier to that right now is that my binutils port requires touching a lot of generated code (config.sub, et al), and I'm not sure how comfortable I am making changes to the things that generate them (or how much I care). Anyone know any binutils wizards?