algorithms. For any standard mode library, it uses the
If you use mixed mode shared libraries, the behavior is based on the first mode encountered. At runtime, the dynamic loader does a
#build standard mode dlls
#libfile1.so is a dependent of libfile2.so
$ ld
$ ld
#build compatibility mode dlls
#libfile3.so is a dependent of libfile4.so
$ ld
$ ld
$ ln
#build a dll using both standard and compatibility mode dependent dlls
#since we didn't specify +compat, the resulting dll is a standard mode dll
$ ld
$ ln
The resulting a.out has standard mode dependents, libfile5.so and libc.so. libfile5.so have two dependents,: libfile4.so and libfile2.so. Thelibfile4.so library is a compatibility mode library, and has a dependent, libfile3.so. libfile2.so is a standard mode library, and has a dependent, libfile1.so. The dynamic loader does a
NOTE: Embedded path inheritance is not applied to any mixed mode shared library and its descendents. It is only applied to libraries in an a.out linked with +compat. Embedded path inheritance does not apply to a
IPF Library Examples
The examples demonstrate the behavior of compatibility and standard mode shared libraries created by the IPF linker toolset:
Library Example: Creating an IPF Compatibility Mode Shared Library
The following example creates a compatibility mode shared library:
$ ld
$ | ld | ||
$ | ld | ||
$ | ld | ||
$ | ld | file3a.o | |
$ | ld | file2a.o | |
$ | elfdump | ||
libfile3a.so: |
| ||
*** Dynamic Section *** | |||
Index | Tag | Value | |
0 |
| HPNeeded | 1:./libfile1.1 |
1 |
| HPNeeded | 1:/var/tmp/libfile3.1 |
2 |
| Soname | libfile3a.1 |
Using Shared Libraries in Default Mode 131