13.3 IMPORT steering file command

Specifies that a symbol is defined in a shared object at runtime.

Note:

A symbol can be imported 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.

Syntax

IMPORT pattern AS replacement_pattern[,pattern AS replacement_pattern]

where:

pattern

is a string, optionally including wildcard characters (either * or ?), that matches zero or more undefined global symbols. If pattern does not match any undefined global symbol, the linker ignores the command. The operand can match only undefined global symbols.

replacement_pattern

is a string, optionally including wildcard characters (either * or ?), to which the symbol is to be renamed. Wild characters must have a corresponding wildcard in pattern. The characters matched by the pattern wildcard are substituted for the replacement_pattern wildcard.

For example:

IMPORT my_func AS func

imports and renames the undefined symbol my_func as func.

Usage

You cannot import a symbol that has been defined in the current shared object or executable. Only one wildcard character (either * or ?) is permitted in IMPORT.

The undefined symbol is included in the dynamic symbol table (as replacement_pattern if given, otherwise as pattern), if a dynamic symbol table is present.

Note:

The IMPORT command only affects undefined global symbols. Symbols that have been resolved by a shared library are implicitly imported into the dynamic symbol table. The linker ignores any IMPORT directive that targets an implicitly imported symbol.

Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.