Linker overview
The IAR ILINK Linker is a powerful, flexible software tool for use in the development of embedded applications. It is equally well suited for linking small, single-file, absolute assembler programs as it is for linking large, relocatable, multi-module, C/C++, or mixed C/C++ and assembler programs.
The linker combines one or more relocatable object files—produced by the IAR compiler or assembler—with selected parts of one or more object libraries to produce an executable image in the industry-standard format Executable and Linking Format (ELF).
The linker will automatically load only those library modules—user libraries and Standard C or C++ library variants—that are actually needed by the application you are linking. Furthermore, the linker eliminates duplicate sections and sections that are not required.
The linker uses a configuration file where you can specify separate locations for code and data areas of your target system memory map. This file also supports automatic handling of the application’s initialization phase, which means initializing global variable areas and code areas by copying initializers and possibly decompressing them as well.
The final output produced by ILINK is an absolute object file containing the executable image in the ELF (including DWARF for debug information) format. The file can be downloaded to C-SPY or any other compatible debugger that supports ELF/DWARF, or it can be stored in EPROM or flash.
To handle ELF files, various tools are included. For information about included utilities, see Specific ELF tools.
Note
The default output format in IAR Embedded Workbench is DEBUG.
Veneers
The RX microcontroller uses veneers when calling a function where the 24-bit offsets do not reach. The veneer introduces code which makes the call successfully reach the destination. This code can be inserted between any caller and called function.
ILINK inserts veneers automatically when they are needed.