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

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-55
LD(arg)
used in all compilations, the symbol region might be extremely large. The default
action for the compiler is to generate an optimized symbol region.
The native C and C++ compilers do not support this pragma; the compilers
generate complete symbols information.
Example
Assume the header file defh contains:
struct worddef {
#ifdef MACHINE_WORDLEN_32
int intvar1;
int intvar2;
#else
long intvar;
#endif };
Further, assume that module1c includes the header file defh and that the structure
worddef contains members intvar1 and intvar2. Also assume that module2c
includes the header file defh and contains a single member intvar. If the LARGESYM
pragma is not used, the compiler creates a single data block that contains only one of
the declarations for the structure worddef. When you try to display a variable of type
worddef in the Inspect debugger, the debugger might display the wrong information.
LD(arg)
The LD pragma specifies arguments to be passed to the ld utility, the TNS/R linker for
PIC (Position-Independent Code).
arg is any argument accepted by the ld utility.
For more details on valid syntax and semantics, see the ld Manual.
The pragma default settings are:
LD(arg)
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler N.A. N.A.
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers Not set Not set
Native c89 utility Not set Not set
TNS/E native C and C++ compilers N.A. N.A.