This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Dynamic library loading inner workings
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Andreas Fink <andreas dot fink85 at googlemail dot com>
- Cc: libc-help at sourceware dot org
- Date: Thu, 2 Dec 2010 15:24:54 -0500
- Subject: Re: Dynamic library loading inner workings
- References: <20101202190743.64d629f5@jocker-laptop>
On Thu, Dec 2, 2010 at 1:07 PM, Andreas Fink
> Yes I know, that the libraries don't need to be unloaded from memory (as defined in the standard), but on linux they are unloaded,
> and if they are not unload from memory there is no way to reopen from harddisk!
Order of library loading matters. Order of library loading changes
relocation processing ordering. If any relocations are left
referencing a library it will not be unloaded, otherwise the program
might crash if it tries to use the relocated reference.
My first guess would be that there is a relocation that is processed
and it prevents one of the libraries from being unloaded.
You can see all of this by running your application with LD_DEBUG=all
environment variable set.
Cheers,
Carlos.