Skip to main content

IAR Embedded Workbench for Arm 9.70.x

‑‑visibility

In this section:
Syntax

‑‑visibility={hidden|interposable|protected}

Parameters

hidden (default)

The symbol is not part of the interface of the shared object, so no other executable file or shared object can reference it directly.

interposable

All global symbols that are not declared with the hidden or protected visibility attribute are public and correspond to external linkage. External or local symbols are not affected.

protected

The symbol is part of the interface of the shared object, but references within the defining module bind to the local symbol. That is, another module cannot override the symbol.

Description

This is a compiler option.

Use this option to set the default visibility of global symbol definitions. Local symbols and extern object declarations, without a corresponding definition or tentative definition, are not affected.

Note

‑‑visibility=interposable corresponds to the default ELF visibility type. Interposable is used because another module can override the symbol, and because it is not a reasonable default value for this setting.

See also

Shared objects (32-bit mode only) and visibility.

Caution

To set this option, use Project>Options>C/C++ Compiler>Extra Options