This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch]: Print size of discarded sections
- From: Tristan Gingold <gingold at ACT-Europe dot FR>
- To: binutils at sourceware dot org
- Date: Wed, 24 Jun 2009 10:50:40 +0200
- Subject: [Patch]: Print size of discarded sections
Hi,
currently when discarded sections are printed in the linker map, their sizes
are explicitely set to 0. Is there a good reason to do so ? Printing the
size is convenient to evaluate the effect of --gc-sections.
I am not 100% sure about this patch but it looks OK (at least no regressions
on x86-linux).
Tristan.
ld/
2009-06-24 Tristan Gingold <gingold@adacore.com>
* ldlang.c (print_input_section): Print the size of discarded sections.
*** ld/ldlang.c 26 May 2009 01:20:39 -0000 1.310
--- ld/ldlang.c 24 Jun 2009 08:40:41 -0000
*************** print_input_section (asection *i)
*** 3984,3993 ****
&& i->output_section->owner == link_info.output_bfd)
addr = i->output_section->vma + i->output_offset;
else
! {
! addr = print_dot;
! size = 0;
! }
minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
--- 3984,3990 ----
&& i->output_section->owner == link_info.output_bfd)
addr = i->output_section->vma + i->output_offset;
else
! addr = print_dot;
minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);