Well, you're welcome to continue using flat binaries.
No skin off my nose. You might like to think why real OSs don't do that (or you may not).
global vars, elf and bin
Re: global vars, elf and bin
Dude, chill. I didn't decide anything yet. That is why I asked for some input.iansjack wrote:Well, you're welcome to continue using flat binaries.
No skin off my nose. You might like to think why real OSs don't do that (or you may not).
Can you elaborate? Why would I want kernel libraries? That was a legit question I was hoping would get answered.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: global vars, elf and bin
For (un)real mode there's Smaller C. Loading a DOS/MZ-style .EXE is easy. The ones produced by Smaller C don't even have DOS relocations to take care of (you save a dozen of instructions by not relocating! ), so just load, set up SS:SP and jump. And you can debug portions of code in DOS, not just on bare metal.Octacone wrote:Btw writing an ELF loader in assembly is a huge pain. I can do it but will take me a lot of time and debugging.
SOLVED global vars, elf and bin
Oh, I don't actually have anything in common with DOS. I am not building a real mode OS or anything like that, if that is what you were thinking. I was talking about my bootloader supporting different formats and such.alexfru wrote:For (un)real mode there's Smaller C. Loading a DOS/MZ-style .EXE is easy. The ones produced by Smaller C don't even have DOS relocations to take care of (you save a dozen of instructions by not relocating! ), so just load, set up SS:SP and jump. And you can debug portions of code in DOS, not just on bare metal.Octacone wrote:Btw writing an ELF loader in assembly is a huge pain. I can do it but will take me a lot of time and debugging.
But I plan on supporting MZ's big brother PE which suits my needs (32 bit code).
Just a quick update:
50 lines of assembly later and I have a fully working elf loader. Wasn't as hard as expected.
I'll be definitely looking into supporting other formats as well (for userspace apps).
Thanks for helping.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader