section Link Option (OS/2, Windows)

Syntax: Default:
link(section, name, attributes) for data sections, determined by setting of link(data, attributes)
for code sections, determined by setting of link(code, attributes)

This option specifies the memory-protection attributes for the named section in the application being built.

By default, the attributes for data sections are taken from the current setting of link(data), which is READ and WRITE by default, and attributes for code sections are taken from the current setting of link(code), which is READ and EXECUTE by default.

To specify the attributes, include one or more of the section attribute letters in the attribute string, in any order. For example, the following line sets the READ and SHARED attributes, but not the EXECUTE, or WRITE attributes, for the section dseg1 in an executable file:

link(section, dseg1, "RS")

You can also set the default attributes of all code sections with link(code, attributes) and of all data sections with link(data, attributes), subject to the following restrictions:



Incremental C++ Builds
C Compilation
Configuration Files
Sections and Segments


Set Build Options
Build


Link Options