[PATCH v3] strip: keep .ctf section in stripped file
Guillermo E. Martinez
guillermo.e.martinez@oracle.com
Fri Feb 24 16:48:38 GMT 2023
On Fri, Feb 24, 2023 at 12:51:25PM +0100, Mark Wielaard wrote:
> Hi Guillermo,
>
Hi Mark,
> On Thu, Feb 23, 2023 at 12:42:37PM -0600, Guillermo E. Martinez via Elfutils-devel wrote:
> > This is the third version of the patch to avoid remove the CTF section in
> > stripped files. Changes from v2:
> >
> > - Rebased from master.
> >
> > Please let me know your thoughts.
> >
> > CTF debug format was designed to be present in stripped files, so
> > this section should not be removed, so a new --remove-ctf option
> > is added to indicate explicitly that .ctf section will be stripped
> > out from binary file.
>
> Since the way to recognize a CTF section is by name ".ctf" does it
> really need a new option? eu-strip already has:
>
> --keep-section=SECTION Keep the named section. SECTION is an extended
> wildcard pattern. May be given more than once.
>
> -R, --remove-section=SECTION Remove the named section. SECTION is an
> extended wildcard pattern. May be given more than
> once. Only non-allocated sections can be
> removed.
>
> Do you really need a new option? Or could you use an explicit
> --keep-section=.ctf and/or --remove-section=.ctf ?
>
Oh, I see, thanks for your comment!. My intention with this patch is to
replicate the same proceeding by _default_ implemented in `binutils strip'
tool, it is: not remove CTF section, except it is indicated explicitly.
Of course, if you think it is not really a good idea, I can propose a
patch to change the invocation of `eu-strip' in `find-debuginfo.sh' to
preserve CTF section as you showed above, when it generates debug
packages.
Kinds regards,
guyillermo
More information about the Elfutils-devel
mailing list