This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] gcc-4.9/changes.html: Mention that LTO now generates slim objects
- From: Richard Biener <rguenther at suse dot de>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Gerald Pfeifer <gerald at pfeifer dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 21 Mar 2014 13:46:01 +0100 (CET)
- Subject: Re: [wwwdocs] gcc-4.9/changes.html: Mention that LTO now generates slim objects
- Authentication-results: sourceware.org; auth=none
- References: <20140321091612 dot GA22982 at physik dot fu-berlin dot de> <alpine dot LSU dot 2 dot 11 dot 1403211036320 dot 6041 at zhemvz dot fhfr dot qr> <20140321124601 dot GA12455 at physik dot fu-berlin dot de>
On Fri, 21 Mar 2014, Tobias Burnus wrote:
> On Fri, Mar 21, 2014 at 10:40:26AM +0100, Richard Biener wrote:
> > On Fri, 21 Mar 2014, Tobias Burnus wrote:
> > > This patch mentions that -flto now generates slim objects. That's especially
> > > relevant for static libraries as one can there run into surprises, if one
> > > does not know about gcc-ar.
> >
> > Please adjust slightly to "When using a linker-plugin,
> > compiling with the <code>-flto</code> option now generates slim
> > object files by default ..." as the change doesn't affect _all_
> > configurations but only those with HAVE_LTO_PLUGIN set (thus
> > -fno-use-linker-plugin overrides the default as well).
> >
> > I'd also mention gcc-nm which needs to be used to inspect archives
> > with thin LTO files.
>
> Thanks for the suggestions - updated patch below.
Ok.
Thanks,
Richard.
>
> Tobias
>
> --- changes.html 8 Mar 2014 20:45:54 -0000 1.63
> +++ changes.html 21 Mar 2014 12:43:44 -0000
> @@ -65,6 +65,16 @@
> <li>Function bodies are now loaded on-demand and released early improving
> overall memory usage at link time.</li>
> <li>C++ hidden keyed methods can now be optimized out.</li>
> + <li>When using a linker plugin, compiling with the <code>-flto</code>
> + option now generates slim objects files (<code>.o</code>) which only
> + contain intermediate language representation for LTO. Use
> + <code>-ffat-lto-objects</code> to create files which contain
> + additionally the object code. To generate static libraries suitable
> + for LTO processing, use <code>gcc-ar</code> and
> + <code>gcc-ranlib</code>; to list symbols from a slim object file use
> + <code>gcc-nm</code>. (Requires that <code>ar</code>,
> + <code>ranlib</code> and <code>nm</code> have been compiled with
> + plugin support.)</li>
> </ul>
> Memory usage building Firefox with debug enabled was reduced from 15GB to
> 3.5GB; link time from 1700 seconds to 350 seconds.
>
>
--
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend"orffer