This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [binutils patch]: -print-gc-sections option: print garbage collected sections
- From: Nick Clifton <nickc at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>, Marcelo Tosatti <marcelo at kvack dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 04 Aug 2006 15:50:09 +0100
- Subject: Re: [binutils patch]: -print-gc-sections option: print garbage collected sections
- References: <20060701231428.GA23415@dmt> <20060707222120.GA29900@lucon.org>
Hi H.J., Hi Marcelo,
I am forwarding it to the binutils mailing list.
I apologise for taking so long to getting round to reviewing this patch.
As it stands the patch is OK, but incomplete. So I have taken the
liberty of applying it along with the following changes:
* I added a --no-print-gc-sections switch so that the option can be
turned off.
* I added documentation to the ld.texinfo file describing the new
switches.
* I added an entry to the ld/NEWS file describing the new feature.
* I changed the message that is printed so that it explicitly states
that it is telling the user about a deleted section, and I used the
bfd error handler routine so that the correct filename can be
displayed.
* I created a set of ChangeLog entries for the patch.
Cheers
Nick
ld/ChangeLog
2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
* ldmain.c (main): Initialise print_gc_sections field of link_info
structure.
* lexsup.c: Add --print-gc-sections and --no-print-gc-sections
switches.
* ld.texinfo: Document new switches.
* NEWS: Mention new switches.
include/ChangeLog
2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
* bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
bfd/ChangeLog
2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
* elflink.c (elf_gc_sweep): If info.print_gc_sections is true,
list removed sections to stderr.