See glibc bug #14511: http://sourceware.org/bugzilla/show_bug.cgi?id=14511 If this can't/won't be fixed at the dynamic linker level, it should be fixed in binutils. Relying on every library, which might not even be intended for use with dlopen but might get loaded implicitly as a dependency of a dlopened library, is unsafe and unpractical; it leads to obscure crash bugs that may only arise for certain configurations of the underlying dependencies of a library. Since unloading a library is unsafe by default unless it was explicitly designed to be unloadable, -z nodelete should be the default option and -z delete should be needed to override it and specify that a .so being generated is intended for use as an unloadable plugin.
This came up in Qualys' recent OpenSSH writeup: https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt.