Hi
how you design your own "shared library"?
how you compile it and load it to memory?
thanks
from Peter ([email protected])
shared library
I use the elf file format for every executable/shared object. The shared objects are loaded by grub as a multiboot module into memory. My kernel identifies them as shared libraries (that's in the first bytes of the elf header) and links them to a specific address (at least on x86, perhaps they will be true position independant on x86-64). When another executable elf file needs a library the library is mapped at that specific address into the address space and all necessary relocations for the executable elf file are processed.
Perhaps I will provide a callback, in case some elf file needs a not already loaded shared library and perhaps I'll reference count the shared libraries so that the memory can be freed, when they are unused. But that are future plans.
Perhaps I will provide a callback, in case some elf file needs a not already loaded shared library and perhaps I'll reference count the shared libraries so that the memory can be freed, when they are unused. But that are future plans.