ALIGN=expression
By default, ELF sections are aligned on a four-byte
boundary. expression can have
any integer value from 0 to 31. The section is aligned on a 2expression-byte
boundary. For example, if expression is 10,
the section is aligned on a 1KB boundary.
This is not the same as the way that the ALIGN directive
is specified.
Note
Do not use ALIGN=0 or ALIGN=1 for
ARM code sections.
Do not use ALIGN=0 for Thumb code sections.
ASSOC=section
section specifies
an associated ELF section. sectionname must be
included in any link that includes section
CODE
Contains machine instructions. READONLY is
the default.
CODEALIGN
Causes armasm to insert NOP instructions when the ALIGN
directive is used after ARM or Thumb instructions within the section, unless the
ALIGN directive specifies a different padding.
CODEALIGN is the default for execute-only sections.
COMDEF
Is a common section definition. This ELF section
can contain code or data. It must be identical to any other section
of the same name in other source files.
Identical ELF sections with the same name are overlaid in
the same section of memory by the linker. If any are different,
the linker generates a warning and does not overlay the sections.
COMGROUP=symbol_name
Is the signature that makes the AREA part
of the named ELF section group. See the GROUP=symbol_name for
more information. The COMGROUP attribute
marks the ELF section group with the GRP_COMDAT flag.
COMMON
Is a common data section. You must not define any
code or data in it. It is initialized to zeros by the linker. All
common sections with the same name are overlaid in the same section
of memory by the linker. They do not all have to be the same size.
The linker allocates as much space as is required by the largest common
section of each name.
DATA
Contains data, not instructions. READWRITE is
the default.
EXECONLY
-
Indicates that the section is execute-only. Execute-only sections must also
have the CODE attribute, and must not have any of the following
attributes:
READONLY.
READWRITE.
DATA.
ZEROALIGN.
armasm faults if any of the following occur in an execute-only
section:
- Explicit data definitions, for example
DCD and
DCB.
- Implicit data definitions, for example
LDR r0,
=0xaabbccdd.
- Literal pool directives, for example
LTORG, if there is
literal data to be emitted.
INCBIN or SPACE directives.
ALIGN directives, if the required alignment cannot be
accomplished by padding with NOP instructions. armasm
implicitly applies the CODEALIGN attribute to sections with
the EXECONLY attribute.
FINI_ARRAY
Sets the ELF type of the current area to SHT_FINI_ARRAY.
GROUP=symbol_name
Is the signature that makes the AREA part
of the named ELF section group. It must be defined by the source
file, or a file included by the source file. All AREAS with
the same symbol_name signature
are part of the same group. Sections within a group are kept or
discarded together.
INIT_ARRAY
Sets the ELF type of the current area to SHT_INIT_ARRAY.
LINKORDER=section
Specifies a relative location for the current section
in the image. It ensures that the order of all the sections with
the LINKORDER attribute, with respect to
each other, is the same as the order of the corresponding named sections in
the image.
MERGE=n
Indicates that the linker can merge the current
section with other sections with the MERGE=n attribute. n is
the size of the elements in the section, for example n is
1 for characters. You must not assume that the section is merged,
because the attribute does not force the linker to merge the sections.
NOALLOC
Indicates that no memory on the target system is
allocated to this area.
NOINIT
Indicates that the data section is uninitialized, or initialized to zero. It
contains only space reservation directives SPACE or DCB, DCD, DCDU, DCQ, DCQU, DCW, or DCWU with
initialized values of zero. You can decide at link time whether an area is
uninitialized or zero-initialized.
Note
ARM® Compiler does
not support systems with ECC or parity protection where the memory is not
initialized.
PREINIT_ARRAY
Sets the ELF type of the current area to SHT_PREINIT_ARRAY.
READONLY
Indicates that this section must not be written
to. This is the default for Code areas.
READWRITE
Indicates that this section can be read from and
written to. This is the default for Data areas.
SECFLAGS=n
Adds one or more ELF flags, denoted by n,
to the current section.
SECTYPE=n
Sets the ELF type of the current section to n.
STRINGS
Adds the SHF_STRINGS flag to
the current section. To use the STRINGS attribute,
you must also use the MERGE=1 attribute.
The contents of the section must be strings that are nul-terminated using
the DCB directive.
ZEROALIGN
-
Causes armasm to insert zeros when the ALIGN directive
is used after ARM or Thumb instructions within the section, unless the
ALIGN directive specifies a different padding.
ZEROALIGN is the default for sections that are not
execute-only.