C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

Usage Guidelines
On Guardian environment, the SEARCH pragma must be entered on the compiler RUN
command line.
The quotation marks enclosing object-file are required delimiters.
If the SEARCH pragma is specified in the same compilation unit with the XMEM, NOXMEM,
WIDE, or SYMBOLS pragmas, the SEARCH pragma must be specified after these pragmas.
SECTION
The SECTION pragma gives a name to a section of a source file for use in an #include directive.
Sections enable you to include only a portion of a file.
SECTION sec-name
sec-name
is a valid C identifier to associate with all source text that follows the SECTION pragma until
another SECTION pragma or the end of the source file.
There is no default setting for this pragma.
Usage Guidelines
The SECTION pragma can appear only in the source text.
A section terminates at the next SECTION pragma or, if there are no more SECTION pragmas,
at the end of the file.
NOTE: Do not use the #pragma ONCE in a header file that contains the #pragma SECTION.
The expected behavior of this combination is undefined.
Example
This example shows that file1 contains three sections:
#pragma SECTION namea
/* ... */
#pragma SECTION nameb
/* ... */
#pragma SECTION namec
To use these sections so that fileA contains sections namea and namec, and fileB contains
section nameb, fileA should contain:
#include "file1(namea, namec)
and fileB should contain:
#include "file1(nameb)"
SHARED
The SHARED pragma directs the native C and C++ compilers to generate shared code, which is
PIC (Position-Independent Code) and to invoke the ld or eld linker to create a PIC library file, or
a dynamic-link library (DLL).
Compare the action of SHARED with that of the two related pragmas:
CALL_SHARED directs the compiler to generate PIC.
NON_SHARED directs the compiler to generate a non-PIC loadfile that cannot be shared and
cannot access PIC files.
SECTION 237