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.man.txt
          +++ new/usr/src/man/man1/ld.1.man.txt
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17         [-z allextract | defaultextract | weakextract ] [-z altexec64]
  18   18         [-z assert-deflib ] [ -z assert-deflib=libname ]
  19   19         [-z combreloc | nocombreloc ] [-z defs | nodefs]
  20   20         [-z direct | nodirect] [-z endfiltee]
  21   21         [-z fatal-warnings | nofatal-warnings ] [-z finiarray=function]
  22   22         [-z globalaudit] [-z groupperm | nogroupperm]
  23   23         [-z guidance[=id1,id2...] [-z help ]
  24   24         [-z ignore | record] [-z initarray=function] [-z initfirst]
  25   25         [-z interpose] [-z lazyload | nolazyload]
  26   26         [-z ld32=arg1,arg2,...] [-z ld64=arg1,arg2,...]
  27      -       [-z loadfltr] [-z muldefs] [-z nocompstrtab] [-z nodefaultlib]
       27 +       [-z loadfltr] [-z muldefs] [-z mulincl] [-z nocompstrtab] [-z nodefaultlib]
  28   28         [-z nodelete] [-z nodlopen] [-z nodump] [-z noldynsym]
  29   29         [-z nopartial] [-z noversion] [-z now] [-z origin]
  30   30         [-z preinitarray=function] [-z redlocsym] [-z relaxreloc]
  31   31         [-z rescan-now] [-z recan] [-z rescan-start ... -z rescan-end]]
  32   32         [-z target=sparc|x86] [-z text | textwarn | textoff]
  33   33         [-z verbose] [-z wrap=symbol] filename...
  34   34  
  35   35  
  36   36  DESCRIPTION
  37   37         The link-editor, ld, combines relocatable object files by resolving
↓ open down ↓ 19 lines elided ↑ open up ↑
  57   57  
  58   58         Dynamic linking is the most common model for combining relocatable
  59   59         objects, and the eventual creation of processes within Solaris. This
  60   60         environment tightly couples the work of the link-editor and the runtime
  61   61         linker, ld.so.1(1).  Both of these utilities, together with their
  62   62         related technologies and utilities, are extensively documented in the
  63   63         Linker and Libraries Guide.
  64   64  
  65   65  
  66   66         If any argument is a library, ld by default searches the library
  67      -       exactly once at the point the library is encountered on the argument
  68      -       list. The library can be either a shared object or relocatable archive.
  69      -       See ar.h(3HEAD)).
       67 +       exactly once at the point the library is first encountered on the
       68 +       argument list. The library can be either a shared object or relocatable
       69 +       archive. See ar.h(3HEAD)).
  70   70  
  71   71  
  72   72         A shared object consists of an indivisible, whole unit that has been
  73   73         generated by a previous link-edit of one or more input files. When the
  74   74         link-editor processes a shared object, the entire contents of the
  75   75         shared object become a logical part of the resulting output file image.
  76   76         The shared object is not physically copied during the link-edit as its
  77   77         actual inclusion is deferred until process execution. This logical
  78   78         inclusion means that all symbol entries defined in the shared object
  79   79         are made available to the link-editing process.  See Chapter 4, Shared
↓ open down ↓ 804 lines elided ↑ open up ↑
 884  884  
 885  885         -z muldefs
 886  886         --allow-multiple-definition
 887  887  
 888  888             Allows multiple symbol definitions. By default, multiple symbol
 889  889             definitions that occur between relocatable objects result in a
 890  890             fatal error condition. This option, suppresses the error condition,
 891  891             allowing the first symbol definition to be taken.
 892  892  
 893  893  
      894 +       -z mulincl
      895 +
      896 +           Allows multiple inclusion of the same file. By default, a warning
      897 +           is generated for libraries that are passed multiple times on the
      898 +           command line.  This option suppresses that warning, allowing -z
      899 +           fatal-warnings to be used when compiling code that makes multiple
      900 +           inclusions.  Note: When a file is specified more than once, only
      901 +           the first instance is included.
      902 +
      903 +
 894  904         -z nocompstrtab
 895  905  
 896  906             Disables the compression of ELF string tables. By default, string
 897  907             compression is applied to SHT_STRTAB sections, and to SHT_PROGBITS
 898  908             sections that have their SHF_MERGE and SHF_STRINGS section flags
 899  909             set.
 900  910  
 901  911  
 902  912         -z nodefaultlib
 903  913  
↓ open down ↓ 399 lines elided ↑ open up ↑
1303 1313         system. Previously, all links would remain intact, with all links
1304 1314         accessing the new file contents. The new ld behavior breaks such links,
1305 1315         with the result that only the specified output file name references the
1306 1316         new file. All the other links continue to reference the old file. To
1307 1317         ensure consistent behavior, applications that rely on multiple hard
1308 1318         links to linker output files should explicitly remove and relink the
1309 1319         other file names.
1310 1320  
1311 1321  
1312 1322  
1313      -                              September 10, 2013                         LD(1)
     1323 +                                August 24, 2016                          LD(1)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX