Loading Shared Object from memory
Fri May 28 19:27:00 GMT 2010
I want to load a shared object from memory out of another ELF binary
(app or SO). For this the SO is stored e.g. in a byte array of the
base ELF binary. The byte array contains the SO as it is stored in a
file on disk. During runtime I want to load this SO WITHOUT storing
it temporary on disk! If I would do this I can make this with
Another idea is that I can map the segments of the SO into memory
and do the work of dlopen() by my own. But this seems to be a lot of
work and is in my opinion very error prone.
Now the question is: Is there a way to run the already loaded
ld-linux.so twice over the new mapped SO? The entry point of the
loaded ld-linux.so I can get with dlopen() + dladdr(). But if I
currently do this out the base ELF binary a SegFault is occurring.
Or is there an easier way to do this at all?
Thank is advance,
More information about the Libc-help