9.3.3. Symbol visibility rules

The linker has a set of rules for which symbols are to be added to the to the dynamic symbol table. Table 9.1 summarizes these rules.

Table 9.1. Visibility rules for references and definitions

VisibilityReference or DefinitionExecutableShared Library
STV_DEFAULTReferenceYesYes
STV_DEFAULTDefinitionNoYes
STV_PROTECTEDReferenceYesYes
STV_PROTECTEDDefinitionNoYes
STV_HIDDENReferenceNoNo[a]
STV_HIDDENDefinitionNoNo[a]
STV_INTERNALReferenceNoNo[a]
STV_INTERNALDefinitionNoNo[a]

[a] STV_HIDDEN or STV_INTERNAL global symbols that are required for relocation can be placed in the dynamic symbol table, but the linker changes them into local symbols to prevent them from being accessed from outside the shared library.


Copyright © 2010 ARM. All rights reserved.ARM DAI 0242A
Non-ConfidentialID011411