executing files
executing files
How can i load a executible within my developed OS? I have the ReadFile funtion of my Filesystem implimented now what i would like to do is load a COFF Executible and have my LoadCOFFExtencion(filename,entrypoint); function load the Extention and run the entrypoint asked. how could i impliment this?
My OS: NasuTek Ensemble http://code.google.com/p/ensemble/
Re: executing files
you need to read the COFF specification, it will tell you how to do it.
I'm afraid i've never read it, so i can't help you with the specifics, although my OS can load ELF files
I'm afraid i've never read it, so i can't help you with the specifics, although my OS can load ELF files
Re: executing files
What if i switch it to a basic Binary file. My filesystem does things differently where i needed a Binary only instead of COFF. My compiler cant compile to ELF otherwise i use it 
My OS: NasuTek Ensemble http://code.google.com/p/ensemble/
- Combuster
- 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: executing files
Then you have absolutely no information about your program. It must always be linked to the same address and you waste lots of space on the BSS section which needs to be hardcoded to zeroes.What if i switch it to a basic Binary file
Read GCC Cross-CompilerMy compiler cant compile to ELF otherwise
- ChazZeromus
- Member

- Posts: 61
- Joined: Sun Jun 22, 2008 4:09 pm
Re: executing files
If you want to strive away from reading the coff specification, then you can make a linker script that can your own custom executables. Or even better, a make file that calls a program that handles your own headers and such after compiling.

Re: executing files
...or you could use ELF 
it's really not that hard to set up a cross-compiler
it's really not that hard to set up a cross-compiler
Re: executing files
I desided on just using a VM of linux to compile my kernel resulting in now ELF! so now im using the ELF executable set. I did look at the coff one but ELF seemed to be the way.
My OS: NasuTek Ensemble http://code.google.com/p/ensemble/

