.section

Name

section -- 

Synopsis

.section name, subsection

Description

Assemble the following code into end of subsection numbered subsection in the COFF named section name. If you omit subsection, the assembler uses subsection number zero. ".section .text" is equivalent to the .text directive; ".section .data" is equivalent to the .data directive.

For COFF targets, the .section directive is used in one of the following ways:

.section name[, "flags"]
.section name[, subsegment]

If the optional argument is quoted, it is taken as flags to use for the section. Each flag is a single character. The following flags are recognized:

b

bss section (uninitialized data)

n

section is not loaded

d, w

writable section

d

data section

r

read-only section

x

executable section

For ELF targets, the .section directive is used in one of the following ways:

.section name[, "flags"]
.section name[, subsegment]

If the optional argument is quoted, it is taken as flags to use for the section. Each flag is a single character. The following flags are recognized:

a

allocate only

w

writable section

d

data section (same as >w)

r

read-only section

x

executable section

If no flags are specified, the default flags depend upon the section name. If the section name is not recognized, the default will be for the section to be loaded and writable.

If the optional argument to the .section directive is not quoted, it is taken as a subsegment number (see Section 5.3).