dlopen/dlclose behaviour - real reloading from disk required.

Carlos O'Donell carlos@systemhalted.org
Fri Dec 11 14:42:00 GMT 2009


2009/12/10 Petr Baudis <pasky@suse.cz>:
>> How can I force real reloading of the modified version?
>>
>> I can provide a test case if someone wants to check it.
>
> That would be good. I'm not completely familiar with ld.so innards, but
> according to dlclose() documentation, it might be that some other
> library still keeps the refcount up... You could also try to watch in
> detail what ld.so does by setting $LD_DEBUG appropriately (see man
> ld.so).

Note that no object which is the target of relocation may be removed
by dlclose, unless the object which had the relocation is itself also
unloaded. If your plugin resolved a relocation from another object, it
will never be unloaded. So keep that in mind.

Cheers,
Carlos.



More information about the Libc-help mailing list