You copied the Doc URL to your clipboard.

Arm Compiler armclang Reference Guide : -fvisibility

-fvisibility

Sets the default visibility of ELF symbols to the specified option.

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.

Default

The default type is -fvisibility=hidden.

Was this page helpful? Yes No