Print this page
10366 ld(1) should support GNU-style linker sets
10581 ld(1) should know kernel modules are a thing


  18 [\fB-i\fR] [\fB-I\fR \fIname\fR] [\fB-l\fR \fIx\fR] [\fB-L\fR \fIpath\fR] [\fB-m\fR] [\fB-M\fR \fImapfile\fR]
  19 [\fB-N\fR \fIstring\fR] [\fB-o\fR \fIoutfile\fR] [\fB-p\fR \fIauditlib\fR] [\fB-P\fR \fIauditlib\fR]
  20 [\fB-Q\fR y | n] [\fB-R\fR \fIpath\fR] [\fB-s\fR] [\fB-S\fR \fIsupportlib\fR] [\fB-t\fR]
  21 [\fB-u\fR \fIsymname\fR] [\fB-V\fR] [\fB-Y P\fR\fI,dirlist\fR] [\fB-z\fR absexec]
  22 [\fB-z\fR allextract | defaultextract | weakextract ] [\fB-z\fR altexec64]
  23 [\fB-z\fR aslr[=\fIstate\fR]] [\fB-z\fR assert-deflib] [ \fB-z\fR assert-deflib=\fIlibname\fR]
  24 [\fB-z\fR combreloc | nocombreloc ] [\fB-z\fR defs | nodefs]
  25 [\fB-z\fR direct | nodirect] [\fB-z\fR endfiltee]
  26 [\fB-z\fR fatal-warnings | nofatal-warnings ] [\fB-z\fR finiarray=\fIfunction\fR]
  27 [\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm] 
  28 [\fB-z\fR guidance[=\fIid1\fR,\fIid2\fR...] [\fB-z\fR help ]
  29 [\fB-z\fR ignore | record] [\fB-z\fR initarray=\fIfunction\fR] [\fB-z\fR initfirst]
  30 [\fB-z\fR interpose] [\fB-z\fR lazyload | nolazyload]
  31 [\fB-z\fR ld32=\fIarg1\fR,\fIarg2\fR,...] [\fB-z\fR ld64=\fIarg1\fR,\fIarg2\fR,...]
  32 [\fB-z\fR loadfltr] [\fB-z\fR muldefs] [\fB-z\fR nocompstrtab] [\fB-z\fR nodefaultlib]
  33 [\fB-z\fR nodelete] [\fB-z\fR nodlopen] [\fB-z\fR nodump] [\fB-z\fR noldynsym]
  34 [\fB-z\fR nopartial] [\fB-z\fR noversion] [\fB-z\fR now] [\fB-z\fR origin]
  35 [\fB-z\fR preinitarray=\fIfunction\fR] [\fB-z\fR redlocsym] [\fB-z\fR relaxreloc]
  36 [\fB-z\fR rescan-now] [\fB-z\fR recan] [\fB-z\fR rescan-start \fI\&...\fR \fB-z\fR rescan-end]]
  37 [\fB-z\fR target=sparc|x86] [\fB-z\fR text | textwarn | textoff]

  38 [\fB-z\fR verbose] [\fB-z\fR wrap=\fIsymbol\fR] \fIfilename\fR...
  39 .fi
  40 
  41 .SH DESCRIPTION
  42 .LP
  43 The link-editor, \fBld\fR, combines relocatable object files by resolving
  44 symbol references to symbol definitions, together with performing relocations.
  45 \fBld\fR operates in two modes, static or dynamic, as governed by the \fB-d\fR
  46 option. In all cases, the output of \fBld\fR is left in the file \fBa.out\fR by
  47 default. See NOTES.
  48 .sp
  49 .LP
  50 In dynamic mode, \fB-dy\fR, the default, relocatable object files that are
  51 provided as arguments are combined to produce an executable object file. This
  52 file is linked at execution with any shared object files that are provided as
  53 arguments. If the \fB-G\fR option is specified, relocatable object files are
  54 combined to produce a shared object. Without the \fB-G\fR option, a dynamic
  55 executable is created.
  56 .sp
  57 .LP


1561 .na
1562 \fB\fB-z\fR \fBtextoff\fR\fR
1563 .ad
1564 .sp .6
1565 .RS 4n
1566 In dynamic mode only, allows relocations against all allocatable sections,
1567 including non-writable ones. This mode is the default when building a shared
1568 object.
1569 .RE
1570 
1571 .sp
1572 .ne 2
1573 .na
1574 \fB\fB-z\fR \fBtextwarn\fR\fR
1575 .ad
1576 .sp .6
1577 .RS 4n
1578 In dynamic mode only, lists a warning if any relocations against non-writable,
1579 allocatable sections remain. This mode is the default when building an
1580 executable.


















































1581 .RE
1582 
1583 .sp
1584 .ne 2
1585 .na
1586 \fB\fB-z\fR \fBverbose\fR\fR
1587 .ad
1588 .sp .6
1589 .RS 4n
1590 This option provides additional warning diagnostics during a link-edit.
1591 Presently, this option conveys suspicious use of displacement relocations. This
1592 option also conveys the restricted use of static \fBTLS\fR relocations when
1593 building shared objects. In future, this option might be enhanced to provide
1594 additional diagnostics that are deemed too noisy to be generated by default.
1595 .RE
1596 
1597 .sp
1598 .ne 2
1599 .na
1600 \fB\fB-z\fR\fBwrap=\fR\fIsymbol\fR\fR




  18 [\fB-i\fR] [\fB-I\fR \fIname\fR] [\fB-l\fR \fIx\fR] [\fB-L\fR \fIpath\fR] [\fB-m\fR] [\fB-M\fR \fImapfile\fR]
  19 [\fB-N\fR \fIstring\fR] [\fB-o\fR \fIoutfile\fR] [\fB-p\fR \fIauditlib\fR] [\fB-P\fR \fIauditlib\fR]
  20 [\fB-Q\fR y | n] [\fB-R\fR \fIpath\fR] [\fB-s\fR] [\fB-S\fR \fIsupportlib\fR] [\fB-t\fR]
  21 [\fB-u\fR \fIsymname\fR] [\fB-V\fR] [\fB-Y P\fR\fI,dirlist\fR] [\fB-z\fR absexec]
  22 [\fB-z\fR allextract | defaultextract | weakextract ] [\fB-z\fR altexec64]
  23 [\fB-z\fR aslr[=\fIstate\fR]] [\fB-z\fR assert-deflib] [ \fB-z\fR assert-deflib=\fIlibname\fR]
  24 [\fB-z\fR combreloc | nocombreloc ] [\fB-z\fR defs | nodefs]
  25 [\fB-z\fR direct | nodirect] [\fB-z\fR endfiltee]
  26 [\fB-z\fR fatal-warnings | nofatal-warnings ] [\fB-z\fR finiarray=\fIfunction\fR]
  27 [\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm]
  28 [\fB-z\fR guidance[=\fIid1\fR,\fIid2\fR...] [\fB-z\fR help ]
  29 [\fB-z\fR ignore | record] [\fB-z\fR initarray=\fIfunction\fR] [\fB-z\fR initfirst]
  30 [\fB-z\fR interpose] [\fB-z\fR lazyload | nolazyload]
  31 [\fB-z\fR ld32=\fIarg1\fR,\fIarg2\fR,...] [\fB-z\fR ld64=\fIarg1\fR,\fIarg2\fR,...]
  32 [\fB-z\fR loadfltr] [\fB-z\fR muldefs] [\fB-z\fR nocompstrtab] [\fB-z\fR nodefaultlib]
  33 [\fB-z\fR nodelete] [\fB-z\fR nodlopen] [\fB-z\fR nodump] [\fB-z\fR noldynsym]
  34 [\fB-z\fR nopartial] [\fB-z\fR noversion] [\fB-z\fR now] [\fB-z\fR origin]
  35 [\fB-z\fR preinitarray=\fIfunction\fR] [\fB-z\fR redlocsym] [\fB-z\fR relaxreloc]
  36 [\fB-z\fR rescan-now] [\fB-z\fR recan] [\fB-z\fR rescan-start \fI\&...\fR \fB-z\fR rescan-end]]
  37 [\fB-z\fR target=sparc|x86] [\fB-z\fR text | textwarn | textoff]
  38 [\fB-z\fR type=\fIexec\fR|\fIkmod\fR|\fIreloc\fR|\fIshared\fR]
  39 [\fB-z\fR verbose] [\fB-z\fR wrap=\fIsymbol\fR] \fIfilename\fR...
  40 .fi
  41 
  42 .SH DESCRIPTION
  43 .LP
  44 The link-editor, \fBld\fR, combines relocatable object files by resolving
  45 symbol references to symbol definitions, together with performing relocations.
  46 \fBld\fR operates in two modes, static or dynamic, as governed by the \fB-d\fR
  47 option. In all cases, the output of \fBld\fR is left in the file \fBa.out\fR by
  48 default. See NOTES.
  49 .sp
  50 .LP
  51 In dynamic mode, \fB-dy\fR, the default, relocatable object files that are
  52 provided as arguments are combined to produce an executable object file. This
  53 file is linked at execution with any shared object files that are provided as
  54 arguments. If the \fB-G\fR option is specified, relocatable object files are
  55 combined to produce a shared object. Without the \fB-G\fR option, a dynamic
  56 executable is created.
  57 .sp
  58 .LP


1562 .na
1563 \fB\fB-z\fR \fBtextoff\fR\fR
1564 .ad
1565 .sp .6
1566 .RS 4n
1567 In dynamic mode only, allows relocations against all allocatable sections,
1568 including non-writable ones. This mode is the default when building a shared
1569 object.
1570 .RE
1571 
1572 .sp
1573 .ne 2
1574 .na
1575 \fB\fB-z\fR \fBtextwarn\fR\fR
1576 .ad
1577 .sp .6
1578 .RS 4n
1579 In dynamic mode only, lists a warning if any relocations against non-writable,
1580 allocatable sections remain. This mode is the default when building an
1581 executable.
1582 .RE
1583 
1584 .sp
1585 .ne 2
1586 .na
1587 \fB-z\fR \fBtype=exec|kmod|reloc|shared\fR
1588 .ad
1589 .sp .6
1590 .RS 4n
1591 Specifies the type of object to create.
1592 
1593 .sp
1594 .ne 2
1595 .na
1596 exec
1597 .ad
1598 .sp .6
1599 .RS 4n
1600 Dynamic executable
1601 .RE
1602 
1603 .sp
1604 .ne 2
1605 .na
1606 reloc
1607 .ad
1608 .sp .6
1609 .RS 4n
1610 Relocatable object
1611 .RE
1612 
1613 .sp
1614 .ne 2
1615 .na
1616 shared
1617 .ad
1618 .sp .6
1619 .RS 4n
1620 Dynamic shared object
1621 .RE
1622 
1623 .sp
1624 .ne 2
1625 .na
1626 kmod
1627 .ad
1628 .sp .6
1629 .RS 4n
1630 illumos kernel module
1631 .RE
1632 .RE
1633 
1634 .sp
1635 .ne 2
1636 .na
1637 \fB\fB-z\fR \fBverbose\fR\fR
1638 .ad
1639 .sp .6
1640 .RS 4n
1641 This option provides additional warning diagnostics during a link-edit.
1642 Presently, this option conveys suspicious use of displacement relocations. This
1643 option also conveys the restricted use of static \fBTLS\fR relocations when
1644 building shared objects. In future, this option might be enhanced to provide
1645 additional diagnostics that are deemed too noisy to be generated by default.
1646 .RE
1647 
1648 .sp
1649 .ne 2
1650 .na
1651 \fB\fB-z\fR\fBwrap=\fR\fIsymbol\fR\fR