This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dynamic library loading inner workings


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]