Results 1 to 3 of 3
Thread: ELF relocation
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2009
When linux load an elf executable, it will resolve all the libraries, but after the executable is finished, will those library it referenced be remove from the memory?
Good Question, though I think your at the wrong forums.
I bet there is somebody here who knows it for sure. But if I recall correctly it unloads all librarys after the elfs execution. Though I ain't a 100% sure on that. To be sure I'd advice to check with Kernel Development Groups @ VGER.KERNEL.ORG
Hope that helps
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
AFAIK, the libraries are only unloaded if there are no other applications using them. The data segments will be unloaded as they are local to the process using them, but the text (code) pages will remain in memory until the last application using them terminates. Then, they might remain in cache so that if you start an application that uses those libraries in a short period of time, it won't need to read the code from disc, but can simply page it back into memory.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!