We need two more data structures, a shared one that maps dlopen handles to DSO pointer to run the thread ctors/dtors and one thread local list of all initialized libraries. The static dso are different and can remain shared because they never change during program execution.