inode-based dlopen caching

Florian Weimer fweimer@redhat.com
Tue Jun 8 16:56:47 GMT 2021


* Soni L. via Libc-help:

> Currently dlopen caching is based on filenames, it'd be nice if it was
> based on inodes to support better "re"loading (aka loading a new module
> with the same name because unloading modules with threads is never a
> good idea). This is good for stuff that deals with plugins.

It's an interesting idea.  We'd probably also want a flag that hides the
symbols from general binding and makes them available for direct dlsym
lookups using the handle returned by dlopen (otherwise the old
definitions stick around).

The tricky question is what to do about dependencies.  A behavioral
change for just one level is not too hard, but everything goes further
is difficult.

Vivek Das Mohapatra's RTLD_SHARED patches may help with isolating
dependencies.

Thanks,
Florian



More information about the Libc-help mailing list