▲ | shakna 8 days ago | ||||||||||||||||
Doesn't dlclose unload things...? > If the reference count drops to zero and no other loaded libraries use symbols in it, then the dynamic library is unloaded. | |||||||||||||||||
▲ | stevenhuang 7 days ago | parent | next [-] | ||||||||||||||||
It's implementation defined. The dlclose may be a noop and that's fine as far as POSIX is concerned. So generally you have no guarantee if your libc actually unmaps the shared object, due to various reasons. There are ways to get it to unload, but that entails digging around platform specific dlopen flags and ensuring symbols in your shared object doesn't use certain load types (unique/nodelete). Thread local storage/destructors also further complicate things. Some libcs like musl dlclose don't do anything for example and just leave things to be unloaded on program exit. | |||||||||||||||||
| |||||||||||||||||
▲ | 7 days ago | parent | prev [-] | ||||||||||||||||
[deleted] |