Introduces a section of one or more
definitions that are access specifiers on sections in your project's output file.
Each definition must be on a separate line. The
SECTIONS keyword can be on the same line as the first definition or on a preceding line. The .def file can contain one or more
SECTIONS statement sets attributes for one or more sections in the image file, and can be used to override the default attributes for each type of section.
The format for
.section_name is the name of a section in your program image and
specifier is one or more of the following access modifiers:
||The section is executable|
||Allows read operations on data|
||Shares the section among all processes that load the image|
||Allows write operations on data|
Separate specifier names with a space. For example:
SECTIONS .rdata READ WRITE
SECTIONS marks the beginning of a list of section
definition must be on a separate line. The
SECTIONS keyword can be on the same line as the first
definition or on a preceding line. The .def file can contain one or more
SECTIONS statements. The
SEGMENTS keyword is supported as a synonym for
Older versions of Visual C++ supported:
section [CLASS 'classname'] specifier
CLASS keyword is supported for compatibility, but is ignored.
An equivalent way to specify section attributes is with the /SECTION option.
Submit and view feedback for