This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New option --print-gc-sections


On Tue, Apr 04, 2006 at 10:00:55AM +0200, Eric Botcazou wrote:
> > I still like the idea of displaying discarded sections in the link map
> > output though.  I think it would be useful to do so whenever -Map or -M
> > is given, so you wouldn't need a new ld option.  You also shouldn't need
> > any new hooks.  At the end of lang_map, just iterate over input
> > sections, looking for any that don't make it to the output bfd.
> 
> Thanks, works fine.  I've put it between the list of archives members included
> in the link and the memory map.  Tested on AMD64/Linux.
> 
> 
> 2006-04-04  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* ldlang.c (lang_map): Print the list of discarded input sections.
> 	(print_input_section): Change parameter and print zero-sized sections.
> 	(print_statement): Adjust call to print_input_section.

I think it would be better to only print the header when you actually
have some discarded sections, ie. print header on finding first
discarded section.  Otherwise you ought to print "None" or somesuch.
OK with that change.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]