On Wed, Feb 06, 2019 at 08:02:28PM +0300, Alexey Izbyshev wrote: > Unfortunately, my test case was a simplified example of a general problem: > dso->deps is assigned only for the main app and for libraries opened with > dlopen(), but not for their dependencies. Consider the following: Right you are. It took me a while to understand what the deps array was even for (since musl's dlclose() doesn't do anything, tracking dependencies is mostly pointless), but I found it is needed for lazy relocation processing. So it is necessary for all libs opened by dlopen() directly to contain a list of all their dependencies. All the other libs can have an empty list. So I propose the attached patch in addition to the previous one. This will set dso->deps to the empty list in all libs not directly loaded from dlopen(). The previous patch is still necessary, as nothing ever calls load_deps() on the libc or the vdso, but all other modules get a load_deps() treatment. > > Alexey > > Ciao, Markus