Re: deadcode optimization

fjh@cs.mu.OZ.AU (Fergus Henderson)
1 Mar 2001 14:16:37 -0500

          From comp.compilers

Related articles
deadcode optimization khoury@club-internet.fr (Elie Khoury) (2001-03-01)
Re: deadcode optimization fjh@cs.mu.OZ.AU (2001-03-01)
Re: deadcode optimization broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2001-03-01)
Re: deadcode optimization Bjorn.DeSutter@rug.ac.be (Bjorn De Sutter) (2001-03-01)
Re: deadcode optimization guerby@acm.org (Laurent Guerby) (2001-03-01)
Re: deadcode optimization stonybrk@fubar.com (Norman Black) (2001-03-04)
Re: deadcode optimization fjh@cs.mu.OZ.AU (2001-03-08)
Re: deadcode optimization tgi@netgem.com (2001-03-08)
[11 later articles]
| List of all articles for this month |

From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.compilers
Date: 1 Mar 2001 14:16:37 -0500
Organization: Computer Science, University of Melbourne
References: 01-03-012
Keywords: linker
Posted-Date: 01 Mar 2001 14:16:37 EST

"Elie Khoury" <khoury@club-internet.fr> writes:


>Is there a way to improve "deadcode removal" = the way the linker
>removes unreferenced functions, in order to have smaller executables ?
>I noticed gcc is very bad with this operation.


For gcc, you can use the `-ffunction-sections' option. This requires
appropriate linker support, of course. Recent versions of GNU ld
provide the necessary support with the option `--gc-sections'.
(However, this option is not supported on all architectures.)


--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
                                                                        | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.