> > I think it would be helpful to understand what you're trying to do. > Thanks for your help so far. Let me try and explain what I'm trying to accomplish. I have a program that runs as an executable and uses pthreads. I've compiled this program with musl statically with the end goal of it being portable across older and newer systems. I want to also be able to compile this program as a shared object so it may be loaded via dlopen() inside of a glibc program. As mentioned previously, if I compile my shared object with glibc, it loads via dlopen(). My lack of understanding is this: if I directly compile in musl's libc.a (which contains its implementation of pthreads) into my shared object, shouldn't it have the relevant pthreads functions compiled in, without having runtime issues? That's what seems to work for my musl-compiled static executable, so I'm trying to wrap my head around why it wouldn't work for a shared object. In my case, I'm considering the shared object just a different form-factor for the same program.