-z nodump sets the DF_1_NODUMP flag, marking the object as not dumpable by the runtime linker's dldump().
FreeBSD does not support dldump() and ignores the DF_1_NODUMP flag; I am not sure about support in any other operating systems outside of Solaris derivatives. That said, some third-party software sets the flag in its build, and it is trivial to support in lld.
Found via FreeBSD PR 230603, kstars failed to link with lld.