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 COMMITTED: Add --strip-debug-non-line


On Wed, May 28, 2008 at 03:36:47PM -0700, Caleb Howe wrote:
> I'm not sure about .debug_frame.  If I understand correctly it's used
> to generate stack traces in cases where the return addresses on the
> stack are likely to be unreliable (usually optimized builds).  My goal
> with this patch was to make smaller debug-able binaries, I hadn't
> considered the case of optimized binaries with debugging information
> included.  It probably makes sense to include it since it's easy to
> get rid of the extra section if desired.

FWIW, Debian's informal policy for libraries that no one is likely to
want to debug (read: glibc) is to ship only .debug_frame and .symtab.
That's a somewhat different use case from yours.  If .debug_line was
sufficiently compact, I wouldn't mind shipping that too.

> I'm not reducing the .debug_str section for two reasons.  One is that
> gcc by default seems to make a lot of the strings directly inline in
> .debug_info, so .debug_str isn't nearly as big as it could be.  The
> second is speed.  RIght now the patch only has to do minimal parsing
> of the debug info tree - removing the strings would entail a lot more
> CPU effort.  I didn't think it was worth the tradeoff.

Gotcha.  The inlined strings in .debug_info are IMO a GCC bug; I filed
a PR about it a while ago.  So, that may change in the future.

Thanks for clarifying!

-- 
Daniel Jacobowitz
CodeSourcery


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