Change the default visibility of functions to be hidden. Tag the
functions we want exported as "BT_EXPORT", rather than tagging the ones
we want hidden as "BT_HIDDEN".
The benefits of this method are explained here:
https://gcc.gnu.org/wiki/Visibility
This is the only practical way to avoid some C++ symbols to be
externally visible (for example, the
bt_param_validation_map_value_entry_descr symbol below).
Change configure.ac to add -fvisibility=hidden to CFLAGS and CXXFLAGS,
and -fvisibility-inlines-hidden to CXXFLAGS. Remove all mentions of
BT_HIDDEN and its definition. Add BT_EXPORT, and tag all functions
meant to be exported with it.
Using the abidiff tool, I confirmed that there is not change in exported
symbols for these two libraries:
I think this is OK, this symbol is only referenced internally, its
address is put in the plugin descriptors table. But its address is
never looked up by an external party. The equivalent symbol for plugins
without an explicit id (__bt_plugin_descriptor_auto) was already local,
I'm not sure why.