Hello everyone.
I am developing a small kernel, to learning purposes. I am at a point, which I believe, the development would benefit of some sort of 'my own' executable format, either for loadable modules, in kernel, as for latter on, in hosted-application.
I do wish to do this also for learning purposes.
I have search for a starting point in developing one's own image, however, I only seem to draw blanks... I do not know how to, if it is at all possible, extent current tools ( GCC, Nasm/ld ) formats to support my own.
If not possible, could you please advice on how to "Roll with my own executable"?
Thank you in advance.
Developing my own OS Executable File Format
Re: Developing my own OS Executable File Format
You do not say anything about your needs for this executable, which makes it very hard to say anything about it. Basically, if you want a completely new format, you'll have to either write your own linker, or (slightly easier) make a converter that converts a standard executable (e.g. ELF) to your own format.taradinhu wrote:If not possible, could you please advice on how to "Roll with my own executable"?
JAL
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Re: Developing my own OS Executable File Format
Hi,
theoretically an excutable file has following records.
Regards
Shrek
theoretically an excutable file has following records.
- Header Record
- Text Record
- Relocaton Record
- Data Record
- UnInitialized Data Record
Regards
Shrek
Re: Developing my own OS Executable File Format
Shrek was right, if you want to make your executable file, first of allShrek wrote: theoretically an excutable file has following records.
- Header Record
- Text Record
- Relocaton Record
- Data Record
- UnInitialized Data Record
you need to creat your own Header Record to be unique,unlike .EXE or .ELF, or you can crack existing executable like .EXE by changing
.EXE signature "MZ" to any other value
Cheers,
Ahmad T. Dajani
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
but it does make you part of a larger picture.
Re: Developing my own OS Executable File Format
You will have to have librarys for the application to run corectly because with no librays the comands mean nothing. They do nothing and link to nothing. So what kind of executable? examples .bzz .tar .exe .pif .bat. What would the application do? Dose your current kernel support multible procces? Will the app have to be installed or can it run instanly? We would like some ore information before you ask. So any information about your current stable relese would be very helpful. If you want it to work you need librarys and supporting files to controll the comants you give the app. So may we have more infomation on you kernel.
Cpu master owns your cpu.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: Developing my own OS Executable File Format
I started off using the RDOFF2 executable and linker format, mostly because it was easy to write a loader and get up and running fairly quickly. There's an article and code somewhere (unfortunately, I can't find it offhand... I may have it on my other system, though. Let me know, and I'll see if I can provide it) to configure LCC to use NASM as a backend; you could easily re-purpose this to use your own assembler/linker once developed, or keep the nasm backend, and look into adding your new format to the list of supported nasm formats (I believe there's mailing lists off the nasm website that could be helpful here).taradinhu wrote: I do not know how to, if it is at all possible, extent current tools ( GCC, Nasm/ld ) formats to support my own.
If not possible, could you please advice on how to "Roll with my own executable"?
If you're not quite sure where to start, though, I'd suggest it might be more beneficial to write your own loader for an existing format. That way you'll gain valuable experience and knowledge as to how linkers and loaders work and, if you then desired, you could put that towards making your own format.
--Jeff