idea for ld feature: eliding unreferenced input sections
Ian Lance Taylor
ian@zembu.com
Wed Jul 7 16:00:00 GMT 1999
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
More information about the Binutils
mailing list