Methods of preventing symbols being exported include:
Declaring a function or variable as static
makes symbol
private to a source code module.
void __attribute__ ((visibility("hidden"))) func(void) { /* Code */ }
Limits visibility of symbol to all of the source code modules that compose a library.
static and hidden
also have a converse effect:
if a symbol is declared using one of these attributes,
then
symbol references within that scope are bound to that definition
(cf. the -Bsymbolic linker option).
(C) 2006, Michael Kerrisk