- IAR Embedded Workbench for RL78 5.20
- IAR C/C++ Development
- Linking your application
- Linking considerations
- Keeping symbols and sections
Keeping symbols and sections
By default, ILINK removes any sections, section fragments, and global symbols that are not needed by the application. To retain a symbol that does not appear to be needed—or actually, the section fragment it is defined in—you can either use the root attribute on the symbol in your C/C++ or assembler source code, or use the ILINK option ‑‑keep. To retain sections based on attribute names or object names, use the directive keep in the linker configuration file.
To prevent ILINK from excluding sections and section fragments, use the command line options ‑‑no_remove or ‑‑no_fragments, respectively.
For information about included and excluded symbols and sections, inspect the log file (the command line option ‑‑log sections).
For more information about the linking procedure for keeping symbols and sections, see The linking process.