/SECTION (Specify Section Attributes)
| Overview | How Do I | Linker Options
Syntax
/SECTION:name**,**[E][C][I][R][W][S][D][K][L][P][X]
This option changes the attributesof a section, overriding the attributesset when the .OBJ file for the section was compiled.
A section in a portable executable (PE) file is roughly equivalent to a segment or the resources in an NE file. Sections contain either code or data. Unlike segments, sections are blocks of contiguous memory with no size constraints. Some sections contain code or data that your program declared and uses directly, while other data sections are created for you by the linker and librarian, and contain information vital to the operating system.
Specify a colon (:) and a section name. The name is case sensitive.
Specify one or more attributes for the section. The attribute characters, listed below, are not case sensitive. You must specify all attributes**that you want the section to have; an omitted attribute character causes that attribute bit to be turned off. The meanings of the attribute characters are shown below.
Character | Attribute | Meaning |
E | Execute | Allows code to be executed |
C | Conforming | Marks the section as conforming |
I | IOPL | Marks the section as IOPL |
R | Read | Allows read operations on data |
W | Write | Allows write operations on data |
S | Shared | Shares the section among all processes that load the image |
D | Discardable | Marks the section as discardable |
K | Cacheable | Marks the section as not cacheable |
L | Preload | VxD only; marks the section as preload |
P | Pageable | Marks the section as not pageable |
X | Memory-resident | VxD only; marks the section as memory-resident |
A section that does not have E, R, or W set is probably invalid.