HP-UX Linker and Libraries Release Notes (September, 2007 )

New +[no]concatrpath Linker Option to Concatenate Search Paths Specified by Multiple +b path_list
Linker Options
The +concatrpath option enables the concatenation of the search paths specified by multiple
+b path_list linker options at link time.
The +noconcatrpath option disables the concatenation of the search paths specified by
multiple +b path_list linker options at link time. Only the path that is specified by the last
+b path_list option on the command line is recorded. This is also the default option when
multiple +b path_list linker options are specified at link time without specifying the
+[no]concatrpath option.
This option is available on Integrity systems and PA64 systems.
chatr/dld Support for Memory Leak Checking
The new +mem_check <enable|disable> option for the chatr command supports automatic
memory leak checking by preloading librtc.[sl|so].
This option directs dld to automatically preload the librtc.[sl|so] runtime library for the
specified executable. The +mem_check option also directs the loader to map all shared library
text into the private address space of the process.
This enhancement simplifies the current method of explicitly preloading the appropriate
librtc.[sl|so] library by using the LD_PRELOAD environment variable. Additionally, the
+mem_check <enable|disable> option ensures that the automated preloading of the
librtc.[sl|so] does not leak to child processes.
To set the target application to preload librtc.[sl|so], enter the following command at the
HP-UX prompt:
$ chatr +mem_check <enable|disable> <executable>
This feature is supported on Integrity systems, PA64 systems, and PA32 systems.
New -nbucket Linker Option to Optimize Hash Table Size
The new -nbucket <pow2|prime|default> linker option enables the user to optimize the
hash table size (number of hash buckets) .
The -nbucket pow2 option sets the number of hash buckets to the highest power of 2 that is
less than the number of dynamic symbols in the library.
The -nbucket prime option sets the number of hash buckets to the largest prime number that
is less than the number of dynamic symbols in the library.
The -nbucket default option sets the number of hash buckets to the default size. (The default
size is currently half the number of dynamic symbols in the library.)
The -nbucket prime option can significantly improve the distribution in the hash table, and
the -nbucket pow2 can significantly reduce the time taken by dld in arithmetic computations
while traversing hash chains. To determine the option that optimizes the hash table size for an
application, run the target application for each of the -nbucket options with the _HP_DLDOPTS
environment variable set to -time . _HP_DLDOPTS=-time directs dld to print the time taken
for shared library loading, symbol resolution, and applying relocations (the time taken by dld
at startup). The optimal hash table setting for a target application is the option that takes the
least time to apply relocations and to resolve symbols.
NOTE: _HP_DLDOPTS=-time runs the complete program in addition to reporting the time
for loading, symbol resolution, and applying relocations. (unlike ldd).
This feature is available on Integrity systems and PA64 systems.
6 HP-UX Linker and Libraries Release Notes (September 2007)