Skip to main content

IAR Embedded Workbench for RL78 5.20

Section control directives

In this section:
Syntax

ALIGN align [, value ]

ALIGNRAM align

ASEGN section [: type ] [: flag ] [, address ]

EVEN [ value ]

ODD [ value ]

RSEG section [: type ] [: flag ] [( align )]

SECTION section [: type ] [: flag ] [( align )]

SECTION_TYPE type-expr {, flags-expr }

Parameters

address

Address where this section part is placed.

align

The power of two to which the address should be aligned.The default align value is 0.

flag

ROOT, NOROOT

ROOT (the default mode) indicates that the section fragment must not be discarded.

NOROOT means that the section fragment is discarded by the linker if no symbols in this section fragment are referred to. Normally, all section fragments except startup code and interrupt vectors should set this flag.

REORDER, NOREORDER

NOREORDER (the default mode) starts a new fragment in the section with the given name, or a new section if no such section exists.

REORDER starts a new section with the given name.

section

The name of the section. The section name is a user-defined symbol that follows the rules described in Symbols.

type

The memory type, which can be either CODE, CONST, or DATA.

value

4-byte value used for padding. The default is zero.

type-expr

A constant expression that identifies the ELF type of the section.

flags-expr

A constant expression that identifies the ELF flags of the section.

Description

The section directives control how code and data are located. For information about the restrictions that apply when using a directive in an expression, see Expression restrictions.

Directive

Description

Expression restrictions

ALIGN

Aligns the program location counter by inserting zero-filled bytes.

No external references

Absolute

ALIGNRAM

Aligns the program location counter.

No external references

Absolute

ASEGN

Begins a named absolute section.

No external references

Absolute

EVEN

Aligns the program counter to an even address.

No external references

Absolute

ODD

Aligns the program counter to an odd address.

No external references

Absolute

RSEG

Begins an ELF section—alias to SECTION.

No external references

Absolute

SECTION

Begins an ELF section.

No external references

Absolute

SECTION_TYPE

Sets ELF type and flags for a section.

Table 125. Section control directives