musl/ldso
Rich Felker 0c53178ec0 fix dlopen/dlsym regression opening libs already loaded at startup
commit 4ff234f6cb erroneously changed
the condition for running certain code at dlopen time to check whether
the library was already relocated rather than whether it already had
its deps[] table filled. this was out of concern over whether the code
under the conditional would be idempotent/safe to call on an
already-loaded libraries. however, I missed a consideration in the
opposite direction: if a library was loaded at program startup rather
than dlopen, its deps[] table was not yet allocated/filled, and
load_deps needs to be called at dlopen time in order for dlsym to be
able to perform dependency-order symbol lookups.

in order to avoid wasteful allocation of lazy-binding relocation
tables for libraries which were already loaded and relocated at
startup, the check for !p->relocated is not deleted entirely, but
moved to apply only to allocation of these dables.
2017-03-21 08:39:37 -04:00
..
dlstart.c fix regression in SH/FDPIC dynamic linker 2016-02-18 04:13:05 +00:00
dynlink.c fix dlopen/dlsym regression opening libs already loaded at startup 2017-03-21 08:39:37 -04:00