public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Alan Modra <amodra@gmail.com>
Cc: Binutils <binutils@sourceware.org>,
	Nick Clifton <nickc@redhat.com>,
	Dave Anglin <dave.anglin@bell.net>, Jeff Law <law@redhat.com>,
	Hans-Peter Nilsson <hp@bitrange.com>
Subject: Re: [PATCH] gas: fix bogus error on .org involving expression
Date: Tue, 28 Jun 2022 09:13:31 +0200	[thread overview]
Message-ID: <38322fc6-1c03-5006-fe9a-44b472a5d4db@suse.com> (raw)
In-Reply-To: <Yrpybi9Wjc/gx9x1@squeak.grove.modra.org>

On 28.06.2022 05:15, Alan Modra wrote:
> This is just speculation but I wonder if we could just drop
> expr_section, and use undefined_section in places where we currently
> create expression symbols?  Conceptually, is there any real difference
> between an expression that we can't resolve just yet, and the simplest
> case of such an expression, an undefined symbol that is a forward
> reference?

Hmm, that's an interesting thought. There are a couple of places where
symbols are explicitly put in expr_section (cgen.c, dwarf2dbg.c,
read.c, tc-avr.c). I also see a possible problem with expression
resolution: A result there may want expressing to live outside of any
"real" section while at the same time also not being undefined. (In
fact that's what part of the patch here arranges for, to make those
cases actually distinguishable.) But it may well be that this is a
theoretical concern only, while really we may have no code which would
actually care.

I can try to find time to actually experiment along these lines, but
some of the mentioned uses don't look very clear how to deal with.
Nor does e.g. do_org() permitting expr_section but forbidding
undefined_section.

Jan

  reply	other threads:[~2022-06-28  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 14:07 Jan Beulich
2022-06-28  3:15 ` Alan Modra
2022-06-28  7:13   ` Jan Beulich [this message]
2022-08-12 11:20   ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2016-03-02 11:29 Jan Beulich

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=38322fc6-1c03-5006-fe9a-44b472a5d4db@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=dave.anglin@bell.net \
    --cc=hp@bitrange.com \
    --cc=law@redhat.com \
    --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).