...
libfile2a.so:
*** Dynamic Section ***
Index | Tag | Value |
0 | HPNeeded | 0:/home/knish/./libfile2.1 |
1 | HPNeeded | 0:./libfile4.so |
2Rpath /var/tmp
...
Library Example: Creating an IPF Standard Mode Shared Library
The following example builds a standard mode library:
$ ld
$ ld
$ ld
$ ld
$ ld
libfile3a.so:
*** Dynamic Section ***
Index Tag Value/Ptr
0Needed libfile1.1
1Needed /var/tmp/libfile3.1
2Soname libfile3a.1
3Rpath .
...
libfile2a.so:
*** Dynamic Section ***
Index Tag | Value/Ptr0 | Needed ./libfile2.1 |
1Needed ./libfile4.so
2Rpath /var/tmp
...
The dynamic loader does dynamic path searching for libfile1.so. It does not do dynamic path searching for libfile2.so, libfile3.so, and libfile4.so.
Library example: IPF Dynamic Path Searching
This example of dynamic path searching demonstrates differences between compatibility mode and standard mode dependent shared libraries. The example builds standard mode libraries and does a standard mode link. By default, the dynamic loader looks at the environment variables LD_LIBRARY_PATH and SHLIB_PATH to find the shared libraries.
#build standard mode shared libraries #libfile1.so is a dependent of libfile2.so $ ld
$ ld
#move dependent lib so dld can't find it
#dld won't find library because we didn't set the environment
#variable LD_LIBRARY_PATH and SHLIB_PATH
#By default, dld will look at the environment variables
#LD_LIBRARY_PATH and
#SHLIB_PATH when doing dynamic path searching unless +noenvvar
#is specified
$ mv libfile2.so /var/tmp
$ ln
132 Creating and Using Libraries