Skip to main content

IAR Embedded Workbench for RX 5.20

SIZEOF section size

In this section:
Syntax
SIZEOF section
Precedence

2

Parameters

section

The name of a relocatable section, which must be defined before SIZEOF is used.

Description

SIZEOF generates SFE-SFB for its argument. That is, it calculates the size in bytes of a section. This is done when modules are linked together.

Example

These two files set size to the size of the section MYCODE.

Table.s:

            name    table
            section MYCODE:CODE   ; Forward declaration of MYCODE
            section SEGTAB:CONST
            data32                ; Disassembled as 32-bit data
size        dc32    sizeof(MYCODE)
            end

Application.s:

            name    application
            section MYCODE:CODE
            code                  ; Disassembled as code
            nop                   ; Placeholder for application
            end