Should strip discard the .ctf section ?
Rich Felker
dalias@libc.org
Mon Oct 7 03:46:00 GMT 2019
On Sun, Oct 06, 2019 at 01:25:51PM -0400, Hans-Peter Nilsson wrote:
> On Sat, 5 Oct 2019, Nick Alcock wrote:
>
> ....
> > By that point you wouldn't want to strip
> > it out by default because too many programs would be using it, any more
> > than you'd want to strip out, say, .eh_frame.
> ....
>
> ITYM .debug_frame. Keeping .eh_frame is quite necessary for the
> program to work correctly, if or when an exception is thrown.
It should be noted that DWARF unwind information has two different
sections that can be used, .eh_frame and .debug_frame, depending on
whether it's present as part of the loadable program (for exception
handling/introspection) or purely as debug information, with
corresponding SHF_ALLOC flag status.
I suspect the same should be done for CTF. There will be users who
want to use it for introspection, and users who want to use it as
lightweight debug information. Forcing the latter to include it in
load segments, making it unstrippable, will make many of us unhappy to
have it at all.
Rich
More information about the Binutils
mailing list