https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91239
--- Comment #12 from Rui Ueyama <rui314 at gmail dot com> --- I mean setting STV_HIDDEN visibility to a symbol prevents it to be visible from any ELF binaries than itself, which may resolve your concern. I may be missing something though.