Re: deadcode optimization (Fergus Henderson)
1 Mar 2001 14:16:37 -0500

          From comp.compilers

Related articles
deadcode optimization (Elie Khoury) (2001-03-01)
Re: deadcode optimization (2001-03-01)
Re: deadcode optimization (Hans-Bernhard Broeker) (2001-03-01)
Re: deadcode optimization (Bjorn De Sutter) (2001-03-01)
Re: deadcode optimization (Laurent Guerby) (2001-03-01)
Re: deadcode optimization (Norman Black) (2001-03-04)
Re: deadcode optimization (2001-03-08)
Re: deadcode optimization (2001-03-08)
[11 later articles]
| List of all articles for this month |

From: (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" <> 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 <> | "I have always known that the pursuit
                                                                        | of excellence is a lethal habit"
WWW: <> | -- 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.