public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: Nick Clifton <nickc@redhat.com>
Cc: Luca Boccassi <bluca@debian.org>, Michael Matz <matz@suse.de>,
	"binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: Output section type (READONLY)
Date: Wed, 16 Feb 2022 18:12:19 -0800	[thread overview]
Message-ID: <20220217021219.qqwepnd4yjaq6ogq@gmail.com> (raw)
In-Reply-To: <e8e9a18d-09ac-5b34-8d80-d30b84c46b15@redhat.com>

On 2022-02-16, Nick Clifton wrote:
> Hi Guys,
>
>  I have gone ahead and applied an update form of Fanguri's patch (attached).

Thanks, this enables a proper way to set the section type in the future.
Hope someone implements this for gold as well since it does not
recognize .note* as SHT_NOTE, either.

>  I extended the patch so that READONLY and type=<typename> can be used together
>  if desired, like this:
>
>    .ro.note   (READONLY (TYPE=SHT_NOTE)) : { LONG(5678); }

... But I am a little bit uneasy with the additional support for READONLY.
Michael's comment (https://sourceware.org/pipermail/binutils/2022-February/119627.html) makes a lot of sense to me
and I think we really need evidence that (READONLY) is needed and worth
adding this syntax to support it...

>  (I chose this particular syntax because it was the easiest to implement.
>
>  Other than that the patch retains all of the features in the original submission:
>
>https://sourceware.org/pipermail/binutils/2022-February/119600.html
>
>Cheers
>  Nick

In addition, as mentioned on
https://bugzilla.redhat.com/show_bug.cgi?id=2052801 ideally when the
output section contains an input section of a different type, ld should
report a type mismatch error to prevent misuse, but I don't know how...

  parent reply	other threads:[~2022-02-17  2:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29  7:45 Fangrui Song
2022-01-29 16:46 ` Luca Boccassi
2022-01-29 18:51   ` Fangrui Song
2022-01-31 13:33 ` Nick Clifton
2022-02-01  3:39   ` Fangrui Song
2022-02-01 11:07     ` Nick Clifton
2022-02-01 11:59       ` Luca Boccassi
2022-02-02  7:29         ` Fangrui Song
2022-02-02 16:54           ` Michael Matz
2022-02-02 18:12             ` Luca Boccassi
2022-02-16 17:38               ` Nick Clifton
2022-02-16 19:03                 ` Luca Boccassi
2022-02-17  2:12                 ` Fangrui Song [this message]
2022-02-21 23:04                   ` Alan Modra
2022-02-21 23:30                     ` Fangrui Song

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=20220217021219.qqwepnd4yjaq6ogq@gmail.com \
    --to=i@maskray.me \
    --cc=binutils@sourceware.org \
    --cc=bluca@debian.org \
    --cc=matz@suse.de \
    --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).