Sets the default visibility of ELF symbol definitions to the specified option. This option does not affect the visibility of reference, extern, ELF symbols.
Syntax
-fvisibility=visibility_type
Where visibility_type is one of the following:
default
Default visibility corresponds to external linkage.
hidden
The symbol is not placed into the dynamic symbol table, so no other executable or shared library can directly reference it. Indirect references are possible using function pointers.
Note:
extern declarations are visible, and all other symbols are hidden.
protected
The symbol is placed into the dynamic symbol table, but references within the defining module bind to the local symbol. That is, another module cannot override the symbol.
Note:
You can override this option in code with the __attribute__((visibility("visibility_type"))) attribute.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.