The IAR Absolute Symbol Exporter—isymexport
The IAR Absolute Symbol Exporter, isymexport, can export absolute symbols from a ROM image file, so that they can be used when you link an add-on application.
To keep symbols from your symbols file in your final application, the symbols must be referred to, either from your source code or by using the linker option ‑‑keep.
Invocation syntax
The invocation syntax for the IAR Absolute Symbol Exporter is:
isymexport [options]inputfileoutputfile
Parameters
The parameters are:
Parameter | Description |
|---|---|
| A ROM image in the form of an executable ELF file (output from linking). |
| Any of the available command line options, see Summary of isymexport options. |
| A relocatable ELF file that can be used as input to linking, and which contains all or a selection of the absolute symbols in the input file. The output file contains only the symbols, not the actual code or data sections. A steering file can be used for controlling which symbols are included, and if desired, for also renaming some of the symbols. |
See also Rules for specifying a filename or directory as parameters.
Caution
In the IDE, to add the export of library symbols, choose Project>Options>Build Actions and specify your command line in the Post-build command line text field, for example:
$TOOLKIT_DIR$\bin\isymexport.exe "$TARGET_PATH$" "$PROJ_DIR$\const_lib.symbols"
Summary of isymexport options
This table summarizes the isymexport command line options:
Command line option | Description |
|---|---|
Specifies a steering file. | |
Exports local symbols. | |
Extends the command line. | |
Extends the command line, optionally with a dependency. | |
Declares that the image does not contain any virtual function calls to potentially discarded functions. | |
Omits the Byte Order Mark from UTF-8 output files. | |
Generates symbols for the areas in RAM that the image uses. | |
Generates symbols to reserve the areas in ROM and RAM that the image uses. | |
Exports the entry point of the application with the given name. | |
Specifies the encoding for text output files. | |
Uses the UTF-8 encoding for text input files. | |
Sends tool output to the console and then exits. |
For more information, see Descriptions of utilities options.
Steering files
A steering file can be used for controlling which symbols are included, and if desired, for also renaming some of the symbols. In the file, you can use show and hide directives to select which public symbols from the input file that are to be included in the output file. rename directives can be used for changing the names of symbols in the input file.
When you use a steering file, only actively exported symbols will be available in the output file. Therefore, a steering file without show directives will generate an output file without symbols.
Syntax
The following syntax rules apply:
Each directive is specified on a separate line.
C comments (
/*...*/) and C++ comments (//...) can be used.Patterns can contain wildcard characters that match more than one possible character in a symbol name.
The
*character matches any sequence of zero or more characters in a symbol name.The
?character matches any single character in a symbol name.
Example
rename xxx_* as YYY_* /*Change symbol prefix from xxx_ to YYY_ */ show YYY_* /* Export all symbols from YYY package */ hide *_internal /* But do not export internal symbols */ show zzz? /* Export zzza, but not zzzaaa */ hide zzzx /* But do not export zzzx */