HP-UX Linker and Libraries User's Guide

In PA-32 mode, the dynamic loader searches paths to resolve external references in the
following order:
1. /var/tmp to find libme.sl found
2. /var/tmp to find libc.sl not found
3. /usr/lib/libc.sl found
In IPF 32-bit mode, the dynamic loader searches paths to resolve external references in
the following order:
1. LD_LIBRARY_PATH (if set) to find libme.sl not found
2. SHLIB_PATH (if set) to find libme.sl not found
3. /var/tmp to find libc.sl not found
4. LD_LIBRARY_PATH (if set) to find libc.so not found
5. SHLIB_PATH (if set) to find libc.so not found
6. /var/tmp to find libc.so not found
7. /usr/lib/hpux32/libc.so found
PA-64, IPF 64-bit mode example:
$ cc +DD64 main.o -L. -Wl,+b/var/tmp -lme
Link the program.
$ mv libme.sl /var/tmp/libme.sl
Move libme.sl.
$ a.out
Run the program.
The dynamic loader searching order is the same in PA-64 and IPF (32-bit and 64-bit).
The dynamic loader searches paths to resolve external references in the following order:
1. LD_LIBRARY_PATH (if set) to find libme.sl not found
2. SHLIB_PATH (if set) to find libme.sl not found
3. /var/tmp to find libme.sl found
4. LD_LIBRARY_PATH (if set) to find libc.so/libc.sl not found
5. /var/tmp to find libc.so/libc.sl not found
6. /var/tmp to find libc.so/libc.sl not found
7. /usr/lib/pa20_64/libc.sl (PA-64) or /usr/lib/hpux64/libc.so (IPF 64-bit) found
Symbol Searching in Dependent Libraries
In IPF (32-bit and 64-bit) and PA-64 mode, the dynamic loader searches shared libraries using a
breadth-first search order. Breadth-first symbol searching is used on all SVR4 platforms.
86 Linker Toolset Differences Between PA-RISC and Itanium-Based Systems