Print this page
7319 Need a way to turn off ld "multiple inclusion" warnings
Reviewed by: Martin Bochnig <opensxce@mail.ru>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/ld.1
          +++ new/usr/src/man/man1/ld.1
   1    1  '\" te
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
   4    4  .\" Copyright (c) 2012, Joyent, Inc. All Rights Reserved
        5 +.\" Copyright 2016 RackTop Systems.
   5    6  .\" 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.
   6    7  .\"  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
   7    8  .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8      -.TH LD 1 "Sep 10, 2013"
        9 +.TH LD 1 "Aug 24, 2016"
   9   10  .SH NAME
  10   11  ld \- link-editor for object files
  11   12  .SH SYNOPSIS
  12   13  .LP
  13   14  .nf
  14   15  \fBld\fR [\fB-32\fR | \fB-64\fR] [\fB-a\fR | \fB-r\fR] [\fB-b\fR] [\fB-B\fRdirect | nodirect]
  15   16  [\fB-B\fR dynamic | static] [\fB-B\fR eliminate] [\fB-B\fR group] [\fB-B\fR local]
  16   17  [\fB-B\fR reduce] [\fB-B\fR symbolic] [\fB-c\fR \fIname\fR] [\fB-C\fR] [\fB-d\fR y | n]
  17   18  [\fB-D\fR \fItoken\fR,...] [\fB-e\fR \fIepsym\fR] [\fB-f\fR \fIname\fR | \fB-F\fR \fIname\fR] [\fB-G\fR] [\fB-h\fR \fIname\fR]
  18   19  [\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]
↓ open down ↓ 3 lines elided ↑ open up ↑
  22   23  [\fB-z\fR allextract | defaultextract | weakextract ] [\fB-z\fR altexec64]
  23   24  [\fB-z\fR assert-deflib ] [ \fB-z\fR assert-deflib=\fIlibname\fR ]
  24   25  [\fB-z\fR combreloc | nocombreloc ] [\fB-z\fR defs | nodefs]
  25   26  [\fB-z\fR direct | nodirect] [\fB-z\fR endfiltee]
  26   27  [\fB-z\fR fatal-warnings | nofatal-warnings ] [\fB-z\fR finiarray=\fIfunction\fR]
  27   28  [\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm] 
  28   29  [\fB-z\fR guidance[=\fIid1\fR,\fIid2\fR...] [\fB-z\fR help ]
  29   30  [\fB-z\fR ignore | record] [\fB-z\fR initarray=\fIfunction\fR] [\fB-z\fR initfirst]
  30   31  [\fB-z\fR interpose] [\fB-z\fR lazyload | nolazyload]
  31   32  [\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 loadfltr] [\fB-z\fR muldefs] [\fB-z\fR mulincl] [\fB-z\fR nocompstrtab] [\fB-z\fR nodefaultlib]
  33   34  [\fB-z\fR nodelete] [\fB-z\fR nodlopen] [\fB-z\fR nodump] [\fB-z\fR noldynsym]
  34   35  [\fB-z\fR nopartial] [\fB-z\fR noversion] [\fB-z\fR now] [\fB-z\fR origin]
  35   36  [\fB-z\fR preinitarray=\fIfunction\fR] [\fB-z\fR redlocsym] [\fB-z\fR relaxreloc]
  36   37  [\fB-z\fR rescan-now] [\fB-z\fR recan] [\fB-z\fR rescan-start \fI\&...\fR \fB-z\fR rescan-end]]
  37   38  [\fB-z\fR target=sparc|x86] [\fB-z\fR text | textwarn | textoff]
  38   39  [\fB-z\fR verbose] [\fB-z\fR wrap=\fIsymbol\fR] \fIfilename\fR...
  39   40  .fi
  40   41  
  41   42  .SH DESCRIPTION
  42   43  .sp
↓ open down ↓ 20 lines elided ↑ open up ↑
  63   64  .sp
  64   65  .LP
  65   66  Dynamic linking is the most common model for combining relocatable objects, and
  66   67  the eventual creation of processes within Solaris. This environment tightly
  67   68  couples the work of the link-editor and the runtime linker, \fBld.so.1\fR(1).
  68   69  Both of these utilities, together with their related technologies and
  69   70  utilities, are extensively documented in the \fILinker and Libraries Guide\fR.
  70   71  .sp
  71   72  .LP
  72   73  If any argument is a library, \fBld\fR by default searches the library exactly
  73      -once at the point the library is encountered on the argument list. The library
  74      -can be either a shared object or relocatable archive. See \fBar.h\fR(3HEAD)).
       74 +once at the point the library is first encountered on the argument list. The
       75 +library can be either a shared object or relocatable archive. See
       76 +\fBar.h\fR(3HEAD)).
  75   77  .sp
  76   78  .LP
  77   79  A shared object consists of an indivisible, whole unit that has been generated
  78   80  by a previous link-edit of one or more input files. When the link-editor
  79   81  processes a shared object, the entire contents of the shared object become a
  80   82  logical part of the resulting output file image. The shared object is not
  81   83  physically copied during the link-edit as its actual inclusion is deferred
  82   84  until process execution. This logical inclusion means that all symbol entries
  83   85  defined in the shared object are made available to the link-editing process.
  84   86  See Chapter 4, \fIShared Objects,\fR in \fILinker and Libraries Guide\fR
↓ open down ↓ 1172 lines elided ↑ open up ↑
1257 1259  .br
1258 1260  .na
1259 1261  \fB\fB--allow-multiple-definition\fR\fR
1260 1262  .ad
1261 1263  .sp .6
1262 1264  .RS 4n
1263 1265  Allows multiple symbol definitions. By default, multiple symbol definitions
1264 1266  that occur between relocatable objects result in a fatal error condition. This
1265 1267  option, suppresses the error condition, allowing the first symbol definition to
1266 1268  be taken.
     1269 +.RE
     1270 +
     1271 +.sp
     1272 +.ne 2
     1273 +.na
     1274 +\fB\fB-z\fR \fBmulincl\fR\fR
     1275 +.ad
     1276 +.sp .6
     1277 +.RS 4n
     1278 +Allows multiple inclusion of the same file. By default, a warning is generated
     1279 +for libraries that are passed multiple times on the command line.  This option
     1280 +suppresses that warning, allowing \fB-z\fR \fBfatal-warnings\fR to be used when
     1281 +compiling code that makes multiple inclusions.  \fBNote:\fR When a file is
     1282 +specified more than once, only the first instance is included.
1267 1283  .RE
1268 1284  
1269 1285  .sp
1270 1286  .ne 2
1271 1287  .na
1272 1288  \fB\fB-z\fR \fBnocompstrtab\fR\fR
1273 1289  .ad
1274 1290  .sp .6
1275 1291  .RS 4n
1276 1292  Disables the compression of \fBELF\fR string tables. By default, string
↓ open down ↓ 591 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX