Use /SECTION to specify memory-protection attributes for the name section. (name is case sensitive).
| /SECTION option syntax |
|---|
|
Default is: Depends on segment type
Abbreviation is: /SEC
You can specify the attributes that are shown in the table below.
| Letter | Sets attribute |
|---|---|
| E or X | EXECUTE2 |
| R | READ |
| S | SHARED |
| W | WRITE1 |
|
|
For example, the following code sets the READ and SHARED attributes, but not the EXECUTE or WRITE attributes, for the section dseg1 in an .EXE file:
/SEC:dseg1,RS
Sections are assigned attributes by default, as shown in the table below.
| Segment | Default attributes |
|---|---|
| Code sections | EXECUTE, READ (ER) |
| Data sections | READ, WRITE (RW), not shared |
| CONST32_RO section | READ, SHARED (RS) |