public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Nick Clifton via Gnu-gabi <gnu-gabi@sourceware.org>
Cc: "guillermo.e.martinez at oracle dot com"
	<sourceware-bugzilla@sourceware.org>,
	Nick Clifton <nickc@redhat.com>
Subject: Re: Using section flags to indicate strip or persistent sections
Date: Mon, 07 Nov 2022 15:06:29 +0100	[thread overview]
Message-ID: <87tu3aamfu.fsf@oracle.com> (raw)
In-Reply-To: <511c27ce-7b04-ea2d-9a62-a110f1f11d87@redhat.com> (Nick Clifton via Gnu-gabi's message of "Mon, 7 Nov 2022 11:04:45 +0000")


> Hi Guys,
>
>   We would like to suggest an extension the ELF section flags which can be
>   used to indicate sections that should, or should not, be stripped when
>   removing debug information.
>
>   The problem we are trying to address is that different stripping tools
>   (strip, eu-strip, llvm-strip) have different heuristics for deciding
>   which sections should be removed when stripping debug information.  In
>   order to fix this we are proposing two new section flags:
>
>     GNU_SHF_CAN_BE_STRIPPED
>     GNU_SHF_DO_NOT_STRIP
>
>   These would be set by the assembler and/or linker to indicate sections
>   that should be removed when stripping and sections which must not be
>   removed when stripping.  It would be an error if both flags were present
>   on a given section, and if neither flag is present then the stripping
>   tool would fall back on its built in heuristics.

I think the "can be" in the GNU_SHF_CAN_BE_STRIPPED name is confusing
given the indicated semantics.

Wouldn't be better to call that flag GNU_SHF_STRIP instead?

>   In addition we need new flags for the assembler's .section directive
>   (suggestion: 'D': can be stripped, 'K' do not strip).
>   This email is to ask if you think that this idea has merit, and if so,
>   are there any guidelines for writing and submitting a formal specification ?
>
> Cheers
>   Nick

      parent reply	other threads:[~2022-11-07 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-29737-203@http.sourceware.org/bugzilla/>
     [not found] ` <bug-29737-203-9tXa0aTrV2@http.sourceware.org/bugzilla/>
2022-11-07 11:04   ` Nick Clifton
2022-11-07 11:23     ` Florian Weimer
2022-11-07 14:09       ` Jose E. Marchesi
2022-11-07 14:06     ` Jose E. Marchesi [this message]

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=87tu3aamfu.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=sourceware-bugzilla@sourceware.org \
    /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).