At runtime, the dynamic loader does a
•Does dynamic path searching only for
•Looks for the shared library as specified in the DT_NEEDED dynamic table entry if it contains a path.
•Looks at LD_LIBRARY_PATH and SHLIB_PATH environment variables at runtime by default when doing dynamic path searching for
•Does not allow RPATH inheritance from ancestors to children (only allowed from parent to child).
•Does a
•Looks at the environment variables first, followed by RPATH, and the default directories by default when doing dynamic path searching for
Linking in
Use the +std option to instructs the linker to do a
Linking in
Use the +compat option to instruct the linker to do a
Changing Mapfiles with
The linker automatically maps sections from input object files onto output segments in executable files. These options to the ld command allow you to change the linker's default mapping.
Use the
The linker uses the file specified by filename as the output file memory map. The +nodefaultmap option used with
NOTE: In most cases, the linker produces a correct executable without the use of the mapfile option. The mapfile option is an advanced feature of the linker toolset intended for systems programming use, not application programming use. When using the mapfile option, you can create executable files that do not execute.
For more information on mapfiles and examples using these options, see “Using Mapfiles” (page 191).
Selecting Verbose Output with +vtype
Use the +vtype option to get verbose output about specified elements of the link operation. The following values specify the typeTable 3 (page 48):
Table 3 values specify the type
Parameter | Description |
|
|
files | Dump information about each object file loaded. |
| $ ld main.o +vtype files |
| Loading main.o: |
|
|
48 Determining How to Link Programs or Libraries (Linker Tasks)