Ap E. Using HP Link Editor/XL with HP C/XL [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Link Editor/XL Reference Manual
Appendix E Using HP Link Editor/XL with HP C/XL
This appendix discusses the HP C/XL compiler conventions that relate
specifically to HP Link Editor/XL. The following items explain how you
use these conventions to successfully create executable program files.
(For details about the compiler conventions shown, see the HP C/XL
Reference Manual Supplement.)
* Compilation units
The entire source file is treated as one compilation unit and the
compiler produces a relocatable object file containing a single
relocatable object module.
* Relocatable object module name
The relocatable object module name is the unqualified name of the
C source file.
* Program entry point
The first executable statement in the function main is the program
entry point.
* Scope of variables
Programs cannot share globals with routines in an executable
library. Since the standard C library is part of the executable
library XL.PUB.SYS, C programs cannot directly reference global
variables in it. To access these global variables, link the
relocatable library, LIBCINIT.LIB.SYS with the program. For
example, if your program contains the declaration,
extern int errno;
you access the C library global errno by linking LIBCINIT with the
program.
* Locality sets
The LOCALITY pragma lets you assign the relocatable object to a
new or existing locality set. If you enter a name of an existing
locality set the relocatable object code is placed into that set.
If the locality set does not exist, a new locality set is created
using that name.
The LOCALITY pragma remains in effect until a new one is
encountered. It can appear anywhere in the source file. However,
the object code for the entire function is placed into the last
locality set specified. You cannot place part of a function in a
locality set.
If you do not enter the LOCALITY pragma, CODE is the default
locality set name.
* Type checking
The C compiler specifies 0 (no checking) as the type checking
level for all C functions. There are no compiler directives that
let you change the level of type checking that the link editor
uses when resolving references between C functions.
MPE/iX 5.0 Documentation