[Patch]: Print size of discarded sections
Tristan Gingold
gingold@ACT-Europe.FR
Wed Jun 24 10:37:00 GMT 2009
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);
More information about the Binutils
mailing list