[PATCH v3] strip: keep .ctf section in stripped file
Nick Clifton
nickc@redhat.com
Fri Mar 3 12:24:19 GMT 2023
Hi Mark,
>>> I am mainly wondering why binutils strip already seems to keep ".ctf"
>>> sections (even without -g).
> Right. But I am wondering how that mechanism works with binutils strip.
> Apparently we do something different in eu-strip which makes it
> necessary to add a --keep-ctf option based on the section name. It
> would be good if we figured out how/what we can do to keep the
> different strip utilities in sync.
I think that the function that does this is "is_strip_section_1" in
binutils/objcopy.c. If an input section has the BSF_DEBUGGING flag
set (an internal flag to he BFD library, but basically it should be
set for all debug sections, including .ctf sections I think), then
the basic decision is to keep the section unless -g is used.
Cheers
Nick
More information about the Elfutils-devel
mailing list