16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

c89, cc, and c++<br />

passing function call parameters in registers. Furthermore, it<br />

reduces the data size by eliminating unused information from<br />

function control blocks.<br />

An XPLINK-compiled program is implicitly a DLL-compiled program<br />

(the C/C++ DLL compiler option need not be specified along with<br />

the XPLINK option). XPLINK improves performance when crossing<br />

function boundaries, even across compilation units, since XPLINK<br />

uses a more efficient linkage mechanism.<br />

For more information about the z/<strong>OS</strong> C/C++ XPLINK compiler<br />

option, refer to z/<strong>OS</strong> XL C/C++ User’s Guide. For more information<br />

about Extra Performance Linkage, refer to z/<strong>OS</strong> Language<br />

Environment Programming Guide.<br />

To use XPLINK, you must both compile and link-edit the program<br />

for XPLINK. All C and C++ source files must be compiled XPLINK,<br />

as you cannot statically link together XPLINK and non-XPLINK C<br />

and C++ object files (with the exception of non-XPLINK ″<strong>OS</strong>″<br />

linkage). You can however mix XPLINK and non-XPLINK<br />

executables across DLL and fetch() boundaries.<br />

To compile a program as XPLINK, specify the z/<strong>OS</strong> XL C/C++<br />

XPLINK compiler option. If there are any exported symbols in the<br />

executable and you want to produce a definition side-deck, specify<br />

the DLL link editor option. When XPLINK is specified in the<br />

link-editing step, different link-edit libraries will be used.<br />

Example: Here is an example of compiling and link-editing an<br />

XPLINK application in one command:<br />

c89 -o outxpl -W c,XPLINK -W l,XPLINK,dll file.c<br />

In order to execute an XPLINK program, the SCEERUN2 as well as<br />

the SCEERUN data set must be in the MVS program search order<br />

(see the prefix_PLIB_PREFIX environment variable).<br />

You cannot use -W to override the compiler options that correspond to<br />

c89/cc/c++ options, with the following exceptions:<br />

v Listing options (corresponding to -V)<br />

v Inlining options (corresponding to -O, -2, and -3)<br />

v Symbolic options (corresponding to -s and -g); symbolic options can be<br />

overridden only when neither -s nor -g is specified.<br />

Notes:<br />

1. Most compiler, prelinker, and IPA linker options have a positive and<br />

negative form. The negative form is the positive with a prepended NO<br />

(as in XREF and NOXREF).<br />

2. The compiler #pragma options directives as well as any other #pragma<br />

directives which are overridden by compiler options, will have no effect<br />

in source code compiled by c89/cc/c++.<br />

3. Link editor options must be specified in the name=value format. Both<br />

the option name and value must be spelled out in full. If you do not<br />

specify a value, a default value of YES is used, except for the following<br />

options, which if specified without a value, have the default values<br />

shown here:<br />

ALIASES ALIASES=ALL<br />

80 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!