This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: idea for ld feature: eliding unreferenced input sections
- To: roland@frob.com
- Subject: Re: idea for ld feature: eliding unreferenced input sections
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 7 Jul 1999 18:59:14 -0400
- CC: binutils@sourceware.cygnus.com
- References: <199907072252.SAA06119@frob.com>
Date: Wed, 7 Jul 1999 18:52:40 -0400
From: Roland McGrath <roland@frob.com>
How hard do people think it would be to add an ld feature as follows?
I have in mind a new option, perhaps `--remove-unneeded-sections', that
would tell ld to discard from the output any input sections to which no
relocs in other sections refer. It could be positional and apply to some
input files and not others, or it could just take the input section
containing the entry point as the root of the section dependency graph.
It's a great idea, and Richard Henderson has already implemented it
for most ELF targets. It's called --gc-sections.
Ian