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.
JamesM wrote:ELF, because I'm using linux and every tool works with it. And GRUB supports it fully, as opposed to the kludgy-at-best support it has for AOUT. Grub can also load your ELF symbol table for you ooooh my kernel is backtrace heaven!
You could just export debugging information into the final binary and use GDB... Being able to debug my source instead of my disassembly is so much easier.
I noticed I forgot to mention that I am using elf (for 32bit protected mode and for 64bit long mode).
But someday I'll try to execute a 32bit Windows executeable on my OS (and therefore support PE). But that will only be a "Hello, World!" and just for fun/out of interest...
JamesM wrote:I really should get round to using GDB with bochs. I never actually have :$
It's powerful, I can tell you that now... From the GDB command line I can execute any function in my kernel (in scope, of course). So I can break and then find out what pid is running by typing "currpid()".
What I'd be more interested in, would be how many of you using the ELF format completely support dynamic linking?
No, don't support it at all. Must get around to that later...
how you guys do the "dynamic linking" of ELF. I searched a few days in google, no good tutorial about that. Introduce one if you have any. many thanks.
from Peter
I suggest you start with the ELF specification. Its not the easiest document but it contains everything you should need. After that, just experiment with it.
As for the original question: I use ELF myself, and especially the relocation info to enable multiple processes to be loaded into the same address space.
"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 ]
You do realize that a large number of tutorials on the subject of Operating system design, are buggy, broken and probably not as effective for your learning, than actually struggling through it yourself, with a good spec?
I'm just loading a flat binary image into memory and jumping to it .
I should probably learn how to use these formats sometime but for now flat binary images do the job just fine and i don't like to overcomplicate thing's .
I agree with you about the keep it simple, you can easy make a simple relocatable bin file by using ebx as a add on to where you loaded the file to, even linux uses something simular.