https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78017
--- Comment #2 from nsz at gcc dot gnu.org --- i see the glibc threads linked from https://sourceware.org/bugzilla/show_bug.cgi?id=5784 but there are other libcs with static linking support, so even if weakrefs worked on glibc (now they don't) this would be a gcc bug on other targets.. when this came up with musl libc it required fair amount of debugging and i see other cases where people spent time on this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33960 so i think it is worth changing the logic.