On Fri Jun 23 18:14:11 2023 +0000, Alex Henrie wrote:
The situation is much improved now thanks to you and Jacek, thank you! As far as I can tell, the only remaining effect of the visibility hidden attribute is to omit the refptr symbols when compiling 32-bit PE modules with Clang. It seems to me that the utility of the visibility hidden attribute hinges on whether or not LLVM will give us another way to omit those symbols. Gabriel found an LLVM merge request to remove them, but it hasn't been touched since 2019. I've poked the LLVM maintainers and hopefully they'll be able to shed some more light on the topic.
@rbernon Not sure if it's just my setup or MinGW (I built it manually), but I also had to pass -Wl,--exclude-all-symbols to the linker to prevent the extern symbols from showing up in the (stripped) DLL. Otherwise they are in the export table, but strangely not actually exported and aren't referenced, just extra junk past the end of the valid export table data.
So you won't see them with objdump, but you'll see them if you view them in hex viewer, or with `strings` or something. If you can reproduce this, would you mind sending a patch to add it? (I'm too afraid of touching configure)
Ideally those symbols shouldn't show up at all, just like static symbols, IMO.