Symbol localization changes symbol linkage from global to local (static). This is used to obscure global symbols in a library which should not be visible outside the library, but must be global because they are accessed by several modules in the library. The linker supports symbol localization through the --localize and --globalize linker options.
The syntax for these options are:
--localize='pattern'
--globalize='pattern'
The pattern is a string with optional wildcards ? or *. Use ? to match a single character and use * to match zero or more characters.
The --localize option changes the symbol linkage to local for symbols matching the pattern.
The --globalize option changes the symbol linkage to global for symbols matching the pattern. The --globalize option only affects symbols that are localized by the --localize option. The --globalize option excludes symbols that match the pattern from symbol localization, provided the pattern defined by --globalize is more restrictive than the pattern defined by --localize.
See Section 8.4.2 for information about using C/C++ identifiers in linker options such as --localize and --globalize.
These options have the following properties:
In map files these symbols are listed under the Localized Symbols heading.