Section Stack Directives

The assembler maintains a section stack, which is defined by the .pushsection and .popsection directives. These directives push and pop previously-defined sections to and from the section stack. The assembler may limit the depth of a section stack, but it must allow at least ten levels. The .pushsection directive pushes the current section onto the stack and switches to the section specified in the directive. The .pushsection directive, like the .section directive, has one of the following formats:

.pushsection section-name

.pushsection section-name,"flags","type"

.pushsection section-name = "flags","type"

Where:

section-name

Represents a user-defined name using any valid identifier. Section names are case-sensitive.

flags

Represents a string constant composed of one or more characters that specify the attributes of a section. See table Section Flag Characters for a list of the valid flag characters.

type

Represents a string constant specifying a type attribute of a section. See table SectionTypes for a list of the section types The .popsection directive pops the previously-pushed section from the top of the stack, and makes it the current one.

 

The Using Section Directives section illustrates how to use the .pushsection and .popsection directives.