| |||
| Home > System V Shared Libraries > Using SVr4 shared libraries > Using a dynamic linker | |||
A shared object or executable file contains all the information necessary for the dynamic linker to load and run the file correctly:
Every shared object contains a SONAME that
identifies the object. You can specify this name on the command
line using the --soname option.name
The linker identifies dependencies to other shared objects using the shared objects specified on the command line.
If you specify the --init command-line
option, the linker uses the specified symbol name to define initialization
code. The dynamic linker executes this code when it loads the executable
file or shared object.symbol
There is no assumption that a symbol named _ini marks
this code.
If you specify the --fini command-line
option, the linker uses the specified symbol name to define finalization
code. The dynamic linker executes this code when it unloads the
executable file or shared object.symbol
There is no assumption that a symbol named _fini marks
this code.
Use the --dynamiclinker command-line
option to specify the dynamic linker to use to load and relocate
the file at runtime. If you are working on Linux platforms, the
linker assumes that the default dynamic linker is name/lib/ld-linux.so.2.