OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 12:45 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: global vars, elf and bin
PostPosted: Sat Jun 23, 2018 10:25 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
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).


Top
 Profile  
 
 Post subject: Re: global vars, elf and bin
PostPosted: Sat Jun 23, 2018 10:32 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
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).


Dude, chill. I didn't decide anything yet. That is why I asked for some input.
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


Top
 Profile  
 
 Post subject: Re: global vars, elf and bin
PostPosted: Sat Jun 23, 2018 3:29 pm 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
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.

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.


Top
 Profile  
 
 Post subject: SOLVED global vars, elf and bin
PostPosted: Tue Jun 26, 2018 4:01 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
alexfru wrote:
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.

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.


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.
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 119 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group