Kenwood HP 9000 Personal Computer User Manual


 
186 Chapter 5
Creating and Using Libraries
Using Shared Libraries in 64-bit mode
mode library. The loader uses 64-bit mode search techniques on all
libraries except for libfile3.sl, in which case it uses 32-mode search
techniques.
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
breadth-first search mechanism.
64-bit Mode Library Examples
The examples demonstrate the behavior of compatibility and standard
mode shared libraries created by the 64-bit mode linker toolset:
Library Example: Creating a 64-bit Mode
Compatibility Mode Shared Library.
The following example creates a compatibility mode shared library.
ld -b file1.o -o libfile1.sl +h libfile1.1
ld -b file2.o -o libfile2.sl +h ./libfile2.1
ld -b file3.o -o libfile3.sl +h /var/tmp/libfile3.1
ld -b file4.o -o libfile4.sl
ld -b +compat file3a.o -o libfile3a.sl -L. -lfile -lfile3 +h
libfile3a.1
ld -b +compat file2a.o -o libfile2a.sl libfile2.sl ./libfile4.sl
+b /var/tmp
elfdump -L libfile3a.sl libfile2a.sl
libfile3a.sl:
*** Dynamic Section ***
Index Tag Value
0 HPNeeded1:./libfile1.1
subject to dynamic path lookup
1 HPNeeded1:/var/tmp/libfile3.1 subject to dyanmic path lookup
2 Sonamelibfile3a.1
...
libfile2a.sl:
*** Dynamic Section ***
Index Tag Value
0 HPNeeded 0:/home/knish/./libfile2.1
not subject to dynamic path
lookup
1 HPNeeded 0:./libfile4.sl not subject to dynamic path lookup
2 Rpath /var/tmp
...