dlmopen and variables in the dynamic loader
Florian Weimer
fweimer@redhat.com
Mon Aug 19 11:27:00 GMT 2019
* Zack Weinberg:
> On Fri, Aug 16, 2019 at 7:44 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> dlmopen carefully replicates the initial ld.so in all namespaces.
>> Unlike libc.so, ld.so is only loaded once. This can be used to share
>> state across all namespaces.
>
> Is it possible that we should change this, and load libc.so only once
> as well? (And maybe also libpthread and libgcc_s? I guess at that
> point we need to invent a DT_ONLY_LOAD_ME_ONCE tag...)
Requirements among applications vary drastically, I fear. For example,
some might want to load a single copy of SQLite, so that the locking
works correctly even if a database file is opened multiple times by one
process. Others may want multiple versions of SQLite, so that each part
of the application uses the version of SQLite it has been tested with.
Thanks,
Florian
More information about the Libc-alpha
mailing list