Linking Question...
Posted: Wed Aug 17, 2005 11:00 pm
Hi,
I'm developing my own OS from scratch.
Instead of writing my own implementation of stdlib, I've decided to write my own classes for everything the way I'd like (ie, my own String class, my own Console class instead of OStream, etc.).
Anyways, my question should be pretty simple. Right now, I only have one executable, kernel.bin. Now, pretty soon, I'll want to implement some sort of loader so my OS can launch other executables.
How will my library come into play? Would the library be linked with every single executable? This could seriously bloat them... Would I want to build the library as a .o file, or some custom format that I make so that I could load it up similarly to a DLL in windows? Then, all of the executables would call across process?
I think I might be just scratching the surface of this issue, and I haven't the faintest idea how to go about this. I have a ways to go before I approach this design issue, but I thought I'd ask how others do it.
Thanks much!
Bryce
I'm developing my own OS from scratch.
Instead of writing my own implementation of stdlib, I've decided to write my own classes for everything the way I'd like (ie, my own String class, my own Console class instead of OStream, etc.).
Anyways, my question should be pretty simple. Right now, I only have one executable, kernel.bin. Now, pretty soon, I'll want to implement some sort of loader so my OS can launch other executables.
How will my library come into play? Would the library be linked with every single executable? This could seriously bloat them... Would I want to build the library as a .o file, or some custom format that I make so that I could load it up similarly to a DLL in windows? Then, all of the executables would call across process?
I think I might be just scratching the surface of this issue, and I haven't the faintest idea how to go about this. I have a ways to go before I approach this design issue, but I thought I'd ask how others do it.
Thanks much!
Bryce