define_section

This pragma controls the definition of a custom section.

Syntax
#pragma define_section <sectname> <istring> [ <ustring> ] [ <accmode> ]
Remarks

Arguments:

<sectname>

Identifier by which this user-defined section is referenced in the source, that is, via the following instructions:

#pragma section <sectname> begin 
__declspec(<sectname>) 
<istring>

Section name string for initialized data assigned to <section>.

For example:

".data" 

Optional Arguments:

<ustring>

Section name string for uninitialized data assigned to <section>. If ustring is not specified then istring is used.

<accmode>

One of the following indicates the attributes of the section

Table 1. Section Attributes
R Readable
RW (default) Readable and writable
RX Readable and executable
RWX Readable, writable, and executable
Note: For an example of define_section, see Listing: Sample Code - pragma define_section and pragma section.
Related Pragma

section