The attached patch adds support for GCC's ELF symbols
visibility, making use of the already present
dllexport support. Basically it checks if the
compiler supports the visibility attribute
and -fvisibility=hidden (the first is a prerequisite
for the second), in which case it adds the
declarations so that it exports the API.
The patch is a bit big, because it uses my
convenience attributes.m4 file (that is used already
by a few packages, and allows to cache the test
values) to do the configure-time checks.
It also has to remove test_libFLAC because it tries
to use an internal symbol of libFLAC that shouldn't
be used as it's not exported. I wouldn't know how to
fix the test exactly.
The result after this patch is ~100 symbols less in
libFLAC, and ~50 more in the other libraries, not a
bad result after all.
Diego "Flameeyes" Pettenò
Log in to post a comment.