| |||
| Home > Linker steering file command reference > EXPORT | |||
The EXPORT command specifies that a symbol can be accessed by other shared objects or executables.
A symbol can be exported only if the reference has STV_DEFAULT visibility.
You must use the --override_visibility command-line
option to enable the linker to override symbol visibility to STV_DEFAULT.
EXPORT pattern [ AS replacement_pattern] [ ,pattern [ AS replacement_pattern]]
where:
patternIs a string, optionally including wildcard characters
(either * or ?), that matches zero
or more defined global symbols. If does
not match any defined global symbol, the linker ignores the command.
The operand can match only defined global symbols.pattern
If the symbol is not defined, the linker issues:
Warning: L6331W: No eligible global symbol matches pattern symbol
replacement_patternIs a string, optionally including wildcard characters
(either * or ?), to which
the defined global symbol is to be renamed. Wild characters must
have a corresponding wildcard in .
The characters matched by the pattern wildcard
are substituted for the replacement_pattern wildcard. pattern
For example:
EXPORT my_func AS func1
renames and exports the defined symbol my_func as func1.
You cannot export a symbol to a name that already exists.
Only one wildcard character (either * or ?)
is permitted in EXPORT.
The defined global symbol is included in the dynamic symbol
table (as if given,
otherwise as replacement_pattern),
if a dynamic symbol table is present.pattern
Using the Linker: