The symbols were not getting hidden visibility because -fvisibility=hidden only applies to definitions, not declarations. Declare them as hidden explicitly in the header so they don't end up in .dynsym of linked shared objects. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29986>