[patch] ld.texinfo, --whole-archive

DJ Delorie dj@redhat.com
Mon Dec 11 13:29:00 GMT 2000


RFC - This is just a minor enhancement.

2000-12-11  DJ Delorie  <dj@redhat.com>

	* ld.texinfo: Add notes about --whole-archive and gcc.

  
Index: ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.27
diff -p -2 -r1.27 ld.texinfo
*** ld.texinfo	2000/11/06 20:27:26	1.27
--- ld.texinfo	2000/12/11 21:27:17
*************** library, forcing every object to be incl
*** 1356,1359 ****
--- 1356,1365 ----
  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}


More information about the Binutils mailing list