Developer Guide and Reference

Contents

Specifying Symbol Visibility Explicitly (Linux*)

This topic applies to C/C++ applications for Linux* only.
You can explicitly set the visibility of an individual symbol using the
visibility
attribute on a data or function declaration. For example:
int i __attribute__ ((visibility("default"))); void __attribute__ ((visibility("hidden"))) x () {...} extern void y() __attribute__ ((visibility("protected")));
The
visibility
declaration attribute accepts one of the five keywords:
  • external
  • default
  • protected
  • hidden
  • internal
The value of the
visibility
declaration attribute overrides the default set by the options
-fpic
or
-fno-common
.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.