changeset 13868:cba64774a360

3302 ld(1) should document -zguidance Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Richard Lowe <richlowe@richlowe.net>
date Thu, 25 Oct 2012 02:27:19 +0000
parents 5190033d0d57
children 921a99998bb4
files usr/src/man/man1/ld.1
diffstat 1 files changed, 99 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/man/man1/ld.1	Tue Oct 23 14:03:05 2012 -0400
+++ b/usr/src/man/man1/ld.1	Thu Oct 25 02:27:19 2012 +0000
@@ -5,7 +5,7 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH LD 1 "Sep 18, 2009"
+.TH LD 1 "Oct 24, 2012"
 .SH NAME
 ld \- link-editor for object files
 .SH SYNOPSIS
@@ -24,7 +24,8 @@
 [\fB-z\fR combreloc | nocombreloc ] [\fB-z\fR defs | nodefs]
 [\fB-z\fR direct | nodirect] [\fB-z\fR endfiltee]
 [\fB-z\fR fatal-warnings | nofatal-warnings ] [\fB-z\fR finiarray=\fIfunction\fR]
-[\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm] [\fB-z\fR help ]
+[\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm] 
+[\fB-z\fR guidance[=\fIid1\fR,\fIid2\fR...] [\fB-z\fR help ]
 [\fB-z\fR ignore | record] [\fB-z\fR initarray=\fIfunction\fR] [\fB-z\fR initfirst]
 [\fB-z\fR interpose] [\fB-z\fR lazyload | nolazyload]
 [\fB-z\fR ld32=\fIarg1\fR,\fIarg2\fR,...] [\fB-z\fR ld64=\fIarg1\fR,\fIarg2\fR,...]
@@ -1013,6 +1014,102 @@
 .sp
 .ne 2
 .na
+\fB-z\fR \fBguidance\fR[=\fIid1\fR,\fIid2\fR...]
+.ad
+.sp .6
+.RS 4n
+Give messages suggesting link-editor features that could improve the resulting
+dynamic object.
+.LP
+Specific classes of suggestion can be silenced by specifying an optional comma separated
+list of guidance identifiers.
+.LP
+The current classes of suggestion provided are:
+
+.sp
+.ne 2
+.na
+Enable use of direct binding
+.ad
+.sp .6
+.RS 4n
+Suggests that \fB-z direct\fR or \fB-B direct\fR be present prior to any
+specified dependency.  This allows predictable symbol binding at runtime.
+
+Can be disabled with \fB-z guidance=nodirect\fR 
+.RE
+
+.sp
+.ne 2
+.na
+Enable lazy dependency loading
+.ad
+.sp .6
+.RS 4n
+Suggests that \fB-z lazyload\fR be present prior to any specified dependency.
+This allows the dynamic object to be loaded more quickly.
+
+Can be disabled with \fB-z guidance=nolazyload\fR.
+.RE
+
+.sp
+.ne 2
+.na
+Shared objects should define all their dependencies.
+.ad
+.sp .6
+.RS 4n
+Suggests that \fB-z defs\fR be specified on the link-editor command line.
+Shared objects that explicitly state all their dependencies behave more
+predictably when used.
+
+Can be be disabled with \fB-z guidance=nodefs\fR
+.RE
+
+.sp
+.ne 2
+.na
+Version 2 mapfile syntax
+.ad
+.sp .6
+.RS 4n
+Suggests that any specified mapfiles use the more readable version 2 syntax.
+
+Can be disabled with \fB-z guidance=nomapfile\fR.
+.RE
+
+.sp
+.ne 2
+.na
+Read-only text segment
+.ad
+.sp .6
+.RS 4n
+Should any runtime relocations within the text segment exist, suggests that
+the object be compiled with position independent code (PIC).  Keeping large
+allocatable sections read-only allows them to be shared between processes
+using a given shared object.
+
+Can be disabled with \fB-z guidance=notext\fR
+.RE
+
+.sp
+.ne 2
+.na
+No unused dependencies
+.ad
+.sp .6
+.RS 4n
+Suggests that any dependency not referenced by the resulting dynamic object be
+removed from the link-editor command line.
+
+Can be disabled with \fB-z guidance=nounused\fR.
+.RE
+.RE 
+
+.sp
+.ne 2
+.na
 \fB\fB-z\fR \fBhelp\fR\fR
 .ad
 .br