C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-56
LD(arg)
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 details on valid syntax and semantics, see the ld Manual.
The pragma default settings are:
Usage Guidelines
•
On Guardian, the LD pragma must be entered on the compiler RUN command line
for TNS/R native C/C++. On OSS, specify the LD pragma by using the -Wld=arg
option with the c89 utility.
•
If you are linking non-PIC files, you must use the NLD(arg) pragma, which
specifies arguments to the TNS/R native non-PIC linker, the nld utility.
•
The LD pragma does not actually invoke the ld linker. To invoke ld, you must
include other pragmas such as RUNNABLE
, SHARED or LINKFILE. If ld is not
invoked, this pragma is ignored.
•
When you specify the LD pragma, you cannot also specify NLD(arg) or
NON_SHARED.
•
The following TNS/R native C command example shows the LD pragma. Note that
if you specify SHARED, you would not need to also include RUNNABLE:
nmc /in prog1/ prog1o;ld(-set highpin off -set highrequester
off),call_shared, runnable
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.