Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: ELF relocation

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    ELF relocation

    Dear all
    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?
    from Peter

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    The Netherlands
    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

    New Users, please read this..
    Google first, then ask..

  3. #3
    Linux Guru Rubberman's Avatar
    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!

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts