Using visibility attributes (IBM extension)
TracyR 270007GUPM Visits (7918)
IBM XL C/C++ for Linux, V13.1 supports an extended feature "Visibility attributes of entities" to assist with performance tuning and application optimization.
The visibility attributes of entity describe whether and how an entity defined in one module can be referenced or used in other modules. Visibility attributes affect entities with external linkage only, and cannot increase the visibility of other entities. By specifying visibility attributes for entities, you can export only the entities that are necessary to shared libraries.
By using this feature, you can obtain the following benefits and advantages:
· Decrease the size of shared libraries.
· Reduce the possibility of symbol collision.
· Allow more optimization for the compile and link phases.
· Improve the efficiency of dynamic linking.
Supported types of entities
C and C++ support different types of entities:
Note: Data types in the C language do not have external linkage, so you cannot specify visibility attributes for C data types.
For more information about the visibility variable attribute, you can see the XL C/C++ Language Reference.