This is the mail archive of the
mailing list for the binutils project.
RE: Debuggin info for unused sections
Thanks for the reply Nick. May be I will look to do this sometime later.
> -----Original Message-----
> From: nick clifton [mailto:email@example.com]
> Sent: Wednesday, January 04, 2012 4:50 PM
> To: Kaushik, Praveen_Kumar
> Cc: firstname.lastname@example.org; Kaushik, Praveen_Kumar
> Subject: Re: Debuggin info for unused sections
> Hi Praveen,
> > While using -gc-sections to remove unused sections, the section is
> removed but the debug info in not removed.
> > Is this expected?
> > Can we completely remove the debug info for unused section?
> It *could* be done, but it would take some effort.
> The assembler would have to generate .debug_line.<foo> sections
> containing the line number debug information for each .main.<foo>
> section, and ensure that there is a relocation referencing .main.<foo>
> inside .debug_line.<foo>. Then the linker would have to be taught
> it can garbage collect *some* debug sections (ie .debug_line).
> So yes, it is possible. You just need to persuade someone to do it.
> do it yourself, of course.