public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: elfutils-devel@sourceware.org,
	"Jose E. Marchesi" <jemarch@gnu.org>,
	Mark Wielaard <mjw@redhat.com>
Subject: Re: [PATCH] strip: keep .ctf section in stripped file
Date: Tue, 7 Jun 2022 14:23:31 +0100	[thread overview]
Message-ID: <851429fd-cb43-f0a8-3db1-6c10587c82fa@redhat.com> (raw)

Hi Guys,

   I apologise - I know that Jose CC'ed me on this topic, but I have lost
   the email, so I am creating this post instead.

> What about using an OS-specific section flag in elf.h, something like:
> 
> #define SHF_GNU_PERSISTENT 0x0ff00001 /* Section must not be stripped.  */

   I rather like this idea.  It would certainly make things easier.
   Assuming that is that there is a convenient way to set the flag.  Ie
   we need to teach the assembler about it, and probably the linker too
   (so that it can be used in linker scripts).

   It might also be a nice idea to have a complimentary flag to indicate
   sections that expect to be stripped, even if they might otherwise be
   retained.  For example:

   #define SHF_GNU_TREAT_AS_DEBUG 0x0ff00002 /* Treat as a debug info section.  Strip with other debug sections and move to a separate debug info file when creating such 
files.  */

   This could be added to note sections for example, where the notes
   will not be needed at run-time.

Cheers
   Nick


             reply	other threads:[~2022-06-07 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 13:23 Nick Clifton [this message]
2022-06-30 19:31 ` Jose E. Marchesi
  -- strict thread matches above, loose matches on Subject: below --
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
2022-06-01  4:34   ` Guillermo E. Martinez

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=851429fd-cb43-f0a8-3db1-6c10587c82fa@redhat.com \
    --to=nickc@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=jemarch@gnu.org \
    --cc=mjw@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).