/SECTION

Syntax:

/SECTION:name,[E][C][I][R][W][S][D][K][L][P][X]

Changes the properties of a section, overriding the properties set 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 properties for the section. The property characters, listed below, are not case sensitive. You must specify all properties that you want the section to have; an omitted property character causes that property bit to be turned off. The meanings of the property characters are shown below.

Character Property 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.