Skip to main content

IAR Embedded Workbench for RISC-V 3.40

The IAR Absolute Symbol Exporter—isymexport

In this section:

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] inputfile outputfile
Parameters

The parameters are:

Parameter

Description

inputfile

A ROM image in the form of an executable ELF file (output from linking).

options

Any of the available command line options, see Summary of isymexport options.

outputfile

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.

Table 99. isymexport parameters 


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

‑‑edit

Specifies a steering file.

‑‑export_locals

Exports local symbols.

-f

Extends the command line.

‑‑f

Extends the command line, optionally with a dependency.

‑‑generate_vfe_header

Declares that the image does not contain any virtual function calls to potentially discarded functions.

‑‑no_bom

Omits the Byte Order Mark from UTF-8 output files.

‑‑ram_reserve_ranges

Generates symbols for the areas in RAM that the image uses.

‑‑reserve_ranges

Generates symbols to reserve the areas in ROM and RAM that the image uses.

‑‑show_entry_as

Exports the entry point of the application with the given name.

‑‑text_out

Specifies the encoding for text output files.

‑‑utf8_text_in

Uses the UTF-8 encoding for text input files.

‑‑version

Sends tool output to the console and then exits.

Table 100. isymexport options summary 


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 */