https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71971
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Note that after dlclose whether the library is really unloaded depends on the runtime linker in glibc. ISTR another bug where a library using specific features are never unloaded where I pointed out the feature in question (but can't find it right now). This is not a compiler issue.