Skip to main content

IAR Embedded Workbench for RISC-V 3.40

Summary of sections

In this section:

The compiler places code and data into sections. Based on a configuration specified in the linker configuration file, ILINK places sections in memory.

This table lists the ELF sections and blocks that are used by the IAR build tools:

Section

Description

.bss

Holds zero-initialized static and global variables.

CSTACK

Holds the stack used by C or C++ programs.

.cstartup

Holds the startup code.

.data

Holds static and global initialized variables.

.data_init

Holds initial values for .data sections when the linker directive initialize is used.

HEAP

Holds the heap.

.iar.dynexit

Holds the atexit table.

.iar.locale_table

Holds the locale table for the selected locales.

__iar_tls$$DATA

Holds the TLS area for the primary thread.

__iar_tls$$INITDATA

Holds initial values for the TLS area.

.init_array

Holds a table of dynamic initialization functions.

.itim

Holds functions and variables for the SiFive ITIM RAM area.

.jumptable

Holds jump tables for switch statements.

.mtext

Holds __machine interrupt functions.

.noinit

Holds __no_init static and global variables.

.preinit_array

Holds a table of dynamic initialization functions.

.rodata

Holds constant data.

.stext

Holds __supervisor interrupt functions.

.tbss

Holds thread-local zero-initialized static and global variables for the primary thread.

.tdata

Holds thread-local initialized static and global variables for the primary thread.

.text

Holds the program code.

.utext

Holds __user interrupt functions.

Table 89. Section summary  


Other sections

In addition to the ELF sections used for your application, the tools use a number of other ELF sections for a variety of purposes:

  • Sections starting with .debug generally contain debug information in the DWARF format

  • Sections starting with .iar.debug contain supplemental debug information in an IAR format

  • The section .comment contains the tools and command lines used for building the file

  • Sections starting with .rel or .rela contain ELF relocation information

  • The section .symtab contains the symbol table for a file

  • The section .strtab contains the names of the symbol in the symbol table

  • The section .shstrtab contains the names of the sections.