Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Porting From Specific UNIX Systems
Open System Services Porting Guide520573-006
9-5
Development Tools
strip removes the symbolic debugging information and symbol tables from an
object file, reducing the amount of space taken on a disk. More information about
using strip is available in the strip(1) online reference page; strip is also
available in the OSS environment.
If you manage your disk usage on the workstation using strip, then you can
manage your disk usage in the OSS environment using strip. Note that strip
should not be used in the OSS environment until all debugging work has been
completed.
Linkable Library Routines
The final phase of compiling is the linking of the object files that you have compiled
with standard library routines. There are system-standard library routines, as well as
private library routines, that you can link into your programs. Your UNIX workstation
might use a separate linker for this task, or your C compiler might provide linking
services.
The HP C compiler also provides linking services, or you can use the nld, ld, or eld
linker if you prefer.
Most UNIX C compilers support both dynamic and static linking. Dynamic linking
implies shared library objects are loaded at execution time. (Static linking includes
library modules in the executable program at compile time.) On a UNIX workstation,
the standard C library /usr/lib/libc.so is searched by default for dynamic library
modules.
The OSS environment also supports both static and dynamic linking. Static linking of
SRLs is performed by the nld utility. A dynamic linking capability is provided by the ld
utility (for TNS/R PIC object files) and the eld utility (for TNS/E object files). ld and
eld create dynamic-link libraries (DLLs), which can be loaded and unloaded by a
running process. Both the OSS and Guardian environments support the following
UNIX98 functions:
OSS and Guardian also provide the HP function dlresultcode(). See the Open
System Services Library Calls Reference Manual for detailed descriptions of these
functions.
When you request linking through the HP C compiler, the compiler, by default, tells the
nld, ld, or eld linker to search the standard C library for static and dynamic library
modules. However, if you invoke nld, ld, or eld directly, you must specifically tell it to
search the standard C library.
dlopen()
dlclose()
dlsym()
dlerror()