HP-UX 11i September 2001 Release Notes
Programming
Libraries
Chapter 13
202
memory functions along with a improved performance qsortroutine. A few other selected
small routines are also included. The intent of this library is that an application can link
this library archived while linking the application as a whole shared. The use of this
archived library is a supported link mode and will not introduce the problems normally
associated with a shared/archive link.
The 32-bit system libraries now have selected API's built with the pragmas
HP_DEFINED_EXTERNAL, HP_LONG_RETURN and HP_NO_RELOCATION. When these three
pragmas are used in the building of libc.sl it is referred to as a fastcalled library. The
result of this is that the export stubs for the selected interfaces have been inlined in the
library code. This reduces the call overhead. Applications that have already been built
will benefit from this without any effort other than the replacement of this library. The
benefit a given application will gain is very dependent on the applications use of the
libc API's that have been fastcalled.
Along with the changes to the build process for libc.2, the following header files have
been changed:
ctype.h
grp.h
mntent.h
pwd.h
stdio.h
stdlib.h
strings.h
string.h
time.h
These header files now contain the necessary fastcall pragmas to enable building a
fastcalled application. To make use of the pragmas to build the application, the define
_HP_SHLIB_CALLS needs to be defined for the application compile. With this define, the
application will now have the import stubs inlined in the application code further
reducing the shared libary call overhead.
CAUTION An application that has been built with the _HP_SHLIB_CALLS define can *ONLY* be
used with a fastcalled libc. If the application also has APIs that are fastcalled and are
part of the applications shared libraries, then that library must also be built with the
fastcall technology
The /usr/lib/pa20_64/libc.2 Library Although the build process for this library has
not changed, the runtime architecture for HPPA-2.0 can make use of a reduced call
overhead technology similar to that that exists with the 32-bit library. There is no
restriction on matching the correct /usr/lib/pa20_64/libc.2 with the fastcalled
application like there is with the 32-bit library.
There is a manpage available for libcres.a (5).
Compatibility Issues An existing PA1.1 application will not have a compatibility
issue with the new 32-bit fastcalled /usr/lib/libc.sl. However, if the fastcall
technology is used to build an application, then that application can only be used with a
fastcall technology library.
An existing 64-bit application does not have any compatibility issues with the existing
/usr/lib/pa20_64/libc.sl libraries. If a 64-bit application is built with the fastcall