Skip to main content

IAR Embedded Workbench for RH850 3.20.x

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:

            module  table
            section MYCODE:CODE  ; Forward declaration of MYCODE.
            section SEGTAB:CONST(2)
            data
size        dc32    sizeof(MYCODE)
            end

Application.s:

            module  application
            section MYCODE:CODE(2)
            code
            nop                  ; Placeholder for application.
            end