May I ask why you don't just use ELF? You could then use GRUB and save yourself these sort of errors. I got the ELF-binutils for DJGPP and have never looked back. It also keeps you from doing complex objcopy commands that may break what might be working properly.
Just my $0.02
Text output; pointer problems
After getting the ELF binutils (and setting the linker script output
format to elf-i386, all warnings are gone (and it works!)
Im primarily doing this from scratch for the experience,
and knowledge of how everything works from the ground up.
I also get more experience with programming itself
It all seems to be working now (Geez, 5 pages...)
Thanks again everyone!!
format to elf-i386, all warnings are gone (and it works!)
Im primarily doing this from scratch for the experience,
and knowledge of how everything works from the ground up.
I also get more experience with programming itself
It all seems to be working now (Geez, 5 pages...)
Thanks again everyone!!
Well, you are specifying in your linker script that you want a binary file out of your kernel.
ld -T script.ld -o outfile *.o
would basicly take your script... make it the whole truth for ld, and then link into outfile.
Now, since your script says you want binary, the result will lack any sort of symbol or section information. In fact, "binary" format files don't even have any identification as to what they contain, so objcopy will be unable to work with files like that..
Anyway, if you've moved to ELF, that's going to make your life easier. But keep in mind, you can't load an ELF file by just dumping it into some point in memory... so if you still don't wanna use GRUB to load your kernel, check out ELF file format.
You'd only need to really look at elf-headers to find where program headers are, and then parse program headers to see what to load and where. For loading a kernel, the relocation stuff and dynamic linking and whatnot ain't very useful, so just ignore.
ld -T script.ld -o outfile *.o
would basicly take your script... make it the whole truth for ld, and then link into outfile.
Now, since your script says you want binary, the result will lack any sort of symbol or section information. In fact, "binary" format files don't even have any identification as to what they contain, so objcopy will be unable to work with files like that..
Anyway, if you've moved to ELF, that's going to make your life easier. But keep in mind, you can't load an ELF file by just dumping it into some point in memory... so if you still don't wanna use GRUB to load your kernel, check out ELF file format.
You'd only need to really look at elf-headers to find where program headers are, and then parse program headers to see what to load and where. For loading a kernel, the relocation stuff and dynamic linking and whatnot ain't very useful, so just ignore.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.