1 LD(1) User Commands LD(1)
2
3
4
5 NAME
6 ld - link-editor for object files
7
8 SYNOPSIS
9 ld [-32 | -64] [-a | -r] [-b] [-Bdirect | nodirect]
10 [-B dynamic | static] [-B eliminate] [-B group] [-B local]
11 [-B reduce] [-B symbolic] [-c name] [-C] [-d y | n]
12 [-D token,...] [-e epsym] [-f name | -F name] [-G] [-h name]
13 [-i] [-I name] [-l x] [-L path] [-m] [-M mapfile]
14 [-N string] [-o outfile] [-p auditlib] [-P auditlib]
15 [-Q y | n] [-R path] [-s] [-S supportlib] [-t]
16 [-u symname] [-V] [-Y P,dirlist] [-z absexec]
17 [-z allextract | defaultextract | weakextract ] [-z altexec64]
18 [-z assert-deflib ] [ -z assert-deflib=libname ]
19 [-z combreloc | nocombreloc ] [-z defs | nodefs]
20 [-z direct | nodirect] [-z endfiltee]
21 [-z fatal-warnings | nofatal-warnings ] [-z finiarray=function]
22 [-z globalaudit] [-z groupperm | nogroupperm]
23 [-z guidance[=id1,id2...] [-z help ]
24 [-z ignore | record] [-z initarray=function] [-z initfirst]
25 [-z interpose] [-z lazyload | nolazyload]
26 [-z ld32=arg1,arg2,...] [-z ld64=arg1,arg2,...]
27 [-z loadfltr] [-z muldefs] [-z nocompstrtab] [-z nodefaultlib]
28 [-z nodelete] [-z nodlopen] [-z nodump] [-z noldynsym]
29 [-z nopartial] [-z noversion] [-z now] [-z origin]
30 [-z preinitarray=function] [-z redlocsym] [-z relaxreloc]
31 [-z rescan-now] [-z recan] [-z rescan-start ... -z rescan-end]]
32 [-z target=sparc|x86] [-z text | textwarn | textoff]
33 [-z verbose] [-z wrap=symbol] filename...
34
35
36 DESCRIPTION
37 The link-editor, ld, combines relocatable object files by resolving
38 symbol references to symbol definitions, together with performing
538 follow. By default, archive members are extracted to satisfy
539 undefined references and to promote tentative definitions with data
540 definitions. Weak symbol references do not trigger extraction.
541 Under the -z allextract or --whole-archive options, all archive
542 members are extracted from the archive. Under -z weakextract, weak
543 references trigger archive extraction. The -z defaultextract or
544 --no-whole-archive options provide a means of returning to the
545 default following use of the former extract options. See Archive
546 Processing in Linker and Libraries Guide.
547
548
549 -z altexec64
550 Execute the 64-bit ld. The creation of very large 32-bit objects
551 can exhaust the virtual memory that is available to the 32-bit ld.
552 The -z altexec64 option can be used to force the use of the
553 associated 64-bit ld. The 64-bit ld provides a larger virtual
554 address space for building 32-bit objects. See The 32-bit link-
555 editor and 64-bit link-editor in Linker and Libraries Guide.
556
557
558 -z combreloc | nocombreloc
559 By default, ld combines multiple relocation sections when building
560 executables or shared objects. This section combination differs
561 from relocatable objects, in which relocation sections are
562 maintained in a one-to-one relationship with the sections to which
563 the relocations must be applied. The -z nocombreloc option disables
564 this merging of relocation sections, and preserves the one-to-one
565 relationship found in the original relocatable objects.
566
567 ld sorts the entries of data relocation sections by their symbol
568 reference. This sorting reduces runtime symbol lookup. When
569 multiple relocation sections are combined, this sorting produces
570 the least possible relocation overhead when objects are loaded into
571 memory, and speeds the runtime loading of dynamic objects.
572
573 Historically, the individual relocation sections were carried over
574 to any executable or shared object, and the -z combreloc option was
575 required to enable the relocation section merging previously
576 described. Relocation section merging is now the default. The -z
577 combreloc option is still accepted for the benefit of old build
|
1 LD(1) User Commands LD(1)
2
3
4
5 NAME
6 ld - link-editor for object files
7
8 SYNOPSIS
9 ld [-32 | -64] [-a | -r] [-b] [-Bdirect | nodirect]
10 [-B dynamic | static] [-B eliminate] [-B group] [-B local]
11 [-B reduce] [-B symbolic] [-c name] [-C] [-d y | n]
12 [-D token,...] [-e epsym] [-f name | -F name] [-G] [-h name]
13 [-i] [-I name] [-l x] [-L path] [-m] [-M mapfile]
14 [-N string] [-o outfile] [-p auditlib] [-P auditlib]
15 [-Q y | n] [-R path] [-s] [-S supportlib] [-t]
16 [-u symname] [-V] [-Y P,dirlist] [-z absexec]
17 [-z allextract | defaultextract | weakextract ] [-z altexec64]
18 [-z aslr[=state]] [-z assert-deflib] [ -z assert-deflib=libname]
19 [-z combreloc | nocombreloc ] [-z defs | nodefs]
20 [-z direct | nodirect] [-z endfiltee]
21 [-z fatal-warnings | nofatal-warnings ] [-z finiarray=function]
22 [-z globalaudit] [-z groupperm | nogroupperm]
23 [-z guidance[=id1,id2...] [-z help ]
24 [-z ignore | record] [-z initarray=function] [-z initfirst]
25 [-z interpose] [-z lazyload | nolazyload]
26 [-z ld32=arg1,arg2,...] [-z ld64=arg1,arg2,...]
27 [-z loadfltr] [-z muldefs] [-z nocompstrtab] [-z nodefaultlib]
28 [-z nodelete] [-z nodlopen] [-z nodump] [-z noldynsym]
29 [-z nopartial] [-z noversion] [-z now] [-z origin]
30 [-z preinitarray=function] [-z redlocsym] [-z relaxreloc]
31 [-z rescan-now] [-z recan] [-z rescan-start ... -z rescan-end]]
32 [-z target=sparc|x86] [-z text | textwarn | textoff]
33 [-z verbose] [-z wrap=symbol] filename...
34
35
36 DESCRIPTION
37 The link-editor, ld, combines relocatable object files by resolving
38 symbol references to symbol definitions, together with performing
538 follow. By default, archive members are extracted to satisfy
539 undefined references and to promote tentative definitions with data
540 definitions. Weak symbol references do not trigger extraction.
541 Under the -z allextract or --whole-archive options, all archive
542 members are extracted from the archive. Under -z weakextract, weak
543 references trigger archive extraction. The -z defaultextract or
544 --no-whole-archive options provide a means of returning to the
545 default following use of the former extract options. See Archive
546 Processing in Linker and Libraries Guide.
547
548
549 -z altexec64
550 Execute the 64-bit ld. The creation of very large 32-bit objects
551 can exhaust the virtual memory that is available to the 32-bit ld.
552 The -z altexec64 option can be used to force the use of the
553 associated 64-bit ld. The 64-bit ld provides a larger virtual
554 address space for building 32-bit objects. See The 32-bit link-
555 editor and 64-bit link-editor in Linker and Libraries Guide.
556
557
558 -z aslr[=state]
559 Specify whether the executable's address space should be randomized
560 on execution. If state is "enabled" randomization will always
561 occur when this executable is run (regardless of inherited
562 settings). If state is "disabled" randomization will never occur
563 when this executable is run. If state is omitted, ASLR is enabled.
564
565 An executable that should simple use the settings inherited from
566 its environment should not use this flag at all.
567
568
569 -z combreloc | nocombreloc
570 By default, ld combines multiple relocation sections when building
571 executables or shared objects. This section combination differs
572 from relocatable objects, in which relocation sections are
573 maintained in a one-to-one relationship with the sections to which
574 the relocations must be applied. The -z nocombreloc option disables
575 this merging of relocation sections, and preserves the one-to-one
576 relationship found in the original relocatable objects.
577
578 ld sorts the entries of data relocation sections by their symbol
579 reference. This sorting reduces runtime symbol lookup. When
580 multiple relocation sections are combined, this sorting produces
581 the least possible relocation overhead when objects are loaded into
582 memory, and speeds the runtime loading of dynamic objects.
583
584 Historically, the individual relocation sections were carried over
585 to any executable or shared object, and the -z combreloc option was
586 required to enable the relocation section merging previously
587 described. Relocation section merging is now the default. The -z
588 combreloc option is still accepted for the benefit of old build
|