10.1.5. Dynamic symbol table rules

As well as manual control of the contents of the dynamic symbol table, armlink also supports populating the dynamic symbol table using a number of fixed exporting rules. These fixed exporting rules use the symbol visibility and type information from the static symbol table to decide which symbols are to be added to the dynamic symbol table.

The exact rules used by the linker depend on the linker command-line options and the type of image being generated by the linker. There are still a number of linker switches that control the exporting rules used to populate the dynamic symbol table. These are listed in Table 10.4.

Table 10.4. Dynamic image linker options

OptionSupported fromVisibility
--dll {--bpabi}RVCT 2.2STV_DEFAULT
--max_visibility=protectedRVCT 2.2STV_HIDDEN
--[no_]export_allRVCT 2.2STV_PROTECTED
--shared {--sysv}RVCT 2.2Creates a SysV Shared library and select SysV shared linking exporting rules
--sysvRVCT 2.2Creates a SysV executable and selects SysV shared linking exporting rules
--override_visibilityRVCT 3.1STV_INTERNAL
--base_platformRVCT 4.0STV_DEFAULT
--undefined=symbolARM Compiler toolchain 4.1Create a symbol reference to the specified symbol name.Issue an implicit --keep(symbol) to prevent any sections brought in to define that symbol from being removed.
--undefined_and_export=symbolARM Compiler toolchain 4.1The same behaviour as the --undefined=symbol, but also adds an implicit EXPORT symbol to push the specified symbol into the dynamic symbol table
--use_definition_visibilityARM Compiler toolchain 4.1A symbol reference with STV_HIDDEN visibility combined with a definition with STV_DEFAULT visibility results in a definition with STV_HIDDEN visibility.

Copyright © 2010 ARM. All rights reserved.ARM DAI 0242A