how to make your own "executable" files in your own OS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: how to make your own "executable" files in your own OS

Post by Firestryke31 »

I don't know how easy it will be to "change the header," mainly because there are a lot of tools that work with the ELF format that you would need to change to get to work with your OS. It might just be easier to have a special section in the ELF file that stores data for your OS (things like minimum version required, program icons (if any), etc.). Then it would be much easier to port those tools.

Well, good luck (and nice avvy)!
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: how to make your own "executable" files in your own OS

Post by jal »

Firestryke31 wrote:I don't know how easy it will be to "change the header," mainly because there are a lot of tools that work with the ELF format that you would need to change to get to work with your OS.
I'm not sure, except for GRUB I don't think there are that many tools you'd actually need after changing the header. That could be the last step. And before the OS is self-hosting and you'd actually need tools to inspect a binary executable, that's lightyears ahead.


JAL
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: how to make your own "executable" files in your own OS

Post by Combuster »

Unless you just do what windows does - anything can be interpreted as an executable - but only .exe is interpreted like that by default. It would logically have to otherwise you could try and start DLLs since they share the file format.
(for the windows nerds, yes, you can change that behaviour)

so you can just have ELFs all over the place, and only treat filename.xso as an executable. (just like .mos is special cased for that purpose in my OS :) )
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Nekrose483
Posts: 7
Joined: Sun Nov 01, 2009 5:00 pm
Location: Deutchland

Re: how to make your own "executable" files in your own OS

Post by Nekrose483 »

Firestryke31 wrote:Well, good luck (and nice avvy)!

thank you ^^ i like yours too.

and,
Combuster wrote:Unless you just do what windows does - anything can be interpreted as an executable - but only .exe is interpreted like that by default. It would logically have to otherwise you could try and start DLLs since they share the file format.
(for the windows nerds, yes, you can change that behaviour)

so you can just have ELFs all over the place, and only treat filename.xso as an executable. (just like .mos is special cased for that purpose in my OS :) )
thank you ^^ i think i might do that. thanks
–Nekrose
Post Reply