
ld(1) |
|
|
|
|
|
|
|
|
|
|
| ld(1) |
NAME |
|
|
|
|
|
|
|
|
|
|
|
|
ld - link editor |
|
|
|
|
|
|
|
|
|
|
| |
SYNOPSIS |
|
|
|
|
|
|
|
|
|
|
|
|
The link editor. Common options: |
|
|
|
|
|
|
|
| ||||
ld |
|
| ||||||||||
|
| |||||||||||
. . . |
|
| ||||||||||
bind ] | dir ] . . . | offset ] | ®le] | [+b path_list ] | ||||||||
[+compat] | [+copyobjdebug] [+df ®le ] |
|
|
|
|
|
| |||||
[+e symbol ] [+ee symbol ] [+fb] [+fbu] | [+gst] |
|
|
|
| |||||||
[+gstsize size] [+h internal_name ] | [+help] [+k] [+n] |
|
|
| ||||||||
[+nocopyobjdebug] | [+noobjdebug ] | [+objdebugonly] [+pd size] |
|
| ||||||||
[+pgm name ] [+pi size] [+s] [+std] | [+tools] [+v[no]shlibunsats] |
|
| |||||||||
[+vallcompatwarnings] [+v[no]compatwarnings] | [+FP ¯ag ] |
|
| |||||||||
[+I symbol ] [+O[no]fastaccess] | [+O[no]procelim] | [ +Oreusedir= dir ] | ||||||||||
[+Oselectivepercent n] [+Oselectivesize size] [+OselectiveO3] |
| |||||||||||
[+Ostaticprediction] |
|
|
|
|
|
|
|
|
| |||
32 Bit (SOM) Link Editor options: |
|
|
|
|
|
|
|
| ||||
ld |
|
| ||||||||||
[+cg pathname] [+dpv] [+filter shared_library_path ] |
|
|
| |||||||||
[+gstbuckets size] [+nosmartbind ] | [+plabel_cache ¯ag] |
|
| |||||||||
64 Bit (ELF) Link Editor options: |
| [+ildnowarn] [+ildpad percentage] | [+ildrelink] | |||||||||
ld | ||||||||||||
[+init | function] | [+interp | ®le] | [+[no]allowunsats] | [+[no]forceload] | |||||||
[+hideallsymbols] [+nodefaultmap] [+noenvvar] [+nodynhash]
[+nosectionmerge] [+paddata pagesize] [+padtext pagesize] [+pdzero] [+stripunwind ] [+vtype type]
DESCRIPTION
ld takes one or more object ®les or libraries as input and combines them to produce a single (usually exe- cutable) ®le. In doing so it resolves references to external symbols, assigns ®nal addresses to procedures and variables, revises code and data to re¯ect new addresses (a process called "relocation"), and updates symbolic debug information when present in the ®le. By default, ld produces an executable ®le that can be run by the
ld recognizes three kinds of input ®les: object ®les created by the compilers, assembler, or linker (also known as .o ®les), shared libraries created by the linker, and archives of object ®les (called archive libraries). An archive library contains a table of all the
ld processes ®les in the same order as they appear on the command line. It includes code and data from an archive library element if and only if that object module provides a de®nition for a currently unresolved reference within the user's program. It is common practice to list libraries following the names of all simple object ®les on the command line.
Code and data from shared libraries is never copied into an executable program. The dynamic loader /usr/lib/dld.sl on
/opt/langtools/lib/crt0.o. For
The text segment of a shared library is shared among all processes that use the library; each process using the library receives its own copy of the data segment. If pxdb
− 1 − | Section 1−423 |
l