]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ld.texinfo: Add notes about --whole-archive and gcc.
authorDJ Delorie <dj@redhat.com>
Tue, 12 Dec 2000 22:37:20 +0000 (22:37 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 12 Dec 2000 22:37:20 +0000 (22:37 +0000)
ld/ChangeLog
ld/ld.texinfo

index e1ad2771000f83f5279c25739630f456cb1d9615..87d8c469e7c32c2c45dd442b412be728ea0a62f6 100644 (file)
@@ -1,3 +1,7 @@
+2000-12-11  DJ Delorie  <dj@redhat.com>
+
+       * ld.texinfo: Add notes about --whole-archive and gcc.
+
 2000-11-18  Fred Fish  <fnf@be.com>
 
        * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
index b7a64e995a767d1ed01be3f55547b301de413b9c..aadfc05d65663429be55203db94c2c8b1a9bfbd6 100644 (file)
@@ -1368,6 +1368,12 @@ files.  This is normally used to turn an archive file into a shared
 library, forcing every object to be included in the resulting shared
 library.  This option may be used more than once.
 
+Two notes when using this option from gcc: First, gcc doesn't know
+about this option, so you have to use @code{-Wl,-whole-archive}.
+Second, don't forget to use @code{-Wl,-no-whole-archive} after your
+list of archives, because gcc will add its own list of archives to
+your link and you may not want this flag to affect those as well.
+
 @kindex --wrap
 @item --wrap @var{symbol}
 Use a wrapper function for @var{symbol}.  Any undefined reference to