From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Mark Wielaard <mark@klomp.org>
Cc: "Guillermo E. Martinez" <guillermo.e.martinez@oracle.com>,
elfutils-devel@sourceware.org, Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH] strip: keep .ctf section in stripped file
Date: Tue, 31 May 2022 14:50:08 +0200 [thread overview]
Message-ID: <87bkvdq327.fsf@oracle.com> (raw)
In-Reply-To: <87fskqov4l.fsf@oracle.com> (Jose E. Marchesi's message of "Tue, 31 May 2022 12:26:50 +0200")
> [Added Nick in CC.]
>
>> Hi Guillermo,
>>
>> On Mon, May 30, 2022 at 09:26:19PM -0500, Guillermo E. Martinez via Elfutils-devel wrote:
>>> Hello elfutils team,
>>>
>>> This patch is meant to avoid remove the CTF section in
>>> stripped files. 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.
>>
>> First, very nice patch. My only real concern with it is that it should
>> describe how the testfile-ctf.bz2 is generated. We don't want really
>> random test binaries in the testsuite. There should be at least some
>> method to regenerate them, even if we don't automate that. See
>> e.g. tests/run-readelf-n.sh which also uses binary test files, but has
>> a little description on how each of them was generated.
>>
>> I am CCing Nick Clifton who works on binutils and annobin to check how
>> binutils strip handles this. And because we were recently discussing
>> putting some annobin data in a special section and how to indicate
>> that this section should be explicitly kept or removed. It would be
>> great if we could come to some kind of standard way of marking such
>> sections so we don't need special arguments for each such section or
>> at least have a more generic SECTION_STRIP_P macro.
>>
>> Note, that this might not be possible, these sections might be to
>> different/specific that generalizing over them is impossible. But it
>> would be good to at least try and discuss it. If only so that elfutils
>> eu-strip and binutils strip agree on how to handle/coordinate on such
>> special sections.
>
> What about using an OS-specific section flag in elf.h, something like:
>
> #define SHF_GNU_PERSISTENT 0x0ff00001 /* Section must not be stripped. */
It now occurs to me that it would be probably better to use a less
abstract name for the flag, like SHF_GNU_NOSTRIP (I'm not that good on
naming stuff.) :)
next prev parent reply other threads:[~2022-05-31 12:50 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 2:26 Guillermo E. Martinez
2022-05-31 7:06 ` Mark Wielaard
2022-05-31 10:26 ` Jose E. Marchesi
2022-05-31 12:50 ` Jose E. Marchesi [this message]
2022-06-01 4:34 ` Guillermo E. Martinez
2022-06-01 15:55 ` [PATCHv2] " Guillermo E. Martinez
2022-12-20 21:35 ` Mark Wielaard
2023-02-22 16:42 ` Mark Wielaard
2023-02-22 16:59 ` Jose E. Marchesi
2023-02-22 17:12 ` Guillermo E. Martinez
2023-02-22 23:04 ` Mark Wielaard
2023-02-23 18:34 ` Guillermo E. Martinez
2023-02-23 18:42 ` [PATCH v3] " Guillermo E. Martinez
2023-02-24 11:51 ` Mark Wielaard
2023-02-24 16:48 ` Guillermo E. Martinez
2023-02-28 12:24 ` Mark Wielaard
2023-02-28 12:45 ` Nick Clifton
2023-02-28 12:59 ` Nick Clifton
2023-02-28 14:27 ` Mark Wielaard
2023-03-03 2:40 ` Guillermo E. Martinez
2023-03-03 12:15 ` Mark Wielaard
2023-03-03 12:24 ` Nick Clifton
2023-03-04 14:00 ` Guillermo E. Martinez
2023-03-07 14:50 ` Mark Wielaard
2023-03-07 20:47 ` Guillermo E. Martinez
2023-03-08 17:45 ` Nix
2023-03-09 23:08 ` Mark Wielaard
2022-06-07 13:23 [PATCH] " Nick Clifton
2022-06-30 19:31 ` Jose E. Marchesi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkvdq327.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=elfutils-devel@sourceware.org \
--cc=guillermo.e.martinez@oracle.com \
--cc=mark@klomp.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).