public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Fangrui Song <i@maskray.me>, Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org, Luca Boccassi <luca.boccassi@microsoft.com>
Subject: Re: Output section type (READONLY)
Date: Mon, 31 Jan 2022 13:33:30 +0000	[thread overview]
Message-ID: <653b3fdf-61ed-2c41-5db2-de40bb51e8a0@redhat.com> (raw)
In-Reply-To: <20220129074545.csaig4kn5bk4si5k@gmail.com>

Hi Fangrui,

> Well, READONLY has another behavior that it forces non-SHF_WRITE output
> even if an input section has the SHF_WRITE flag.

> I find this quite dangerous if an input section has the SHF_WRITE flag.
> I do not see in what circumstances a user may want this behavior.
> This just seems very dangerous to use in general.

So basically what you are saying is that if a input section is assigned
to an output sections with incompatible attributes (presumably because of a
linker script declaration) then the linker should issue a warning message,
yes ?

By extension then, this feature should cover not just the readonly section
attribute, but the NOLOAD attribute as well.

This sounds like it might be an interesting feature to implement for someone
looking to gain experience with the binutils.

Cheers
   Nick





  parent reply	other threads:[~2022-01-31 13:33 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 [this message]
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
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=653b3fdf-61ed-2c41-5db2-de40bb51e8a0@redhat.com \
    --to=nickc@redhat.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    --cc=luca.boccassi@microsoft.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).