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: Fri, 12 Aug 2022 13:20:05 +0200	[thread overview]
Message-ID: <cae0b39e-c1fe-a50d-c85b-e3e36b1026c7@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?

I've tried this, but failed miserably already on very basic code. In
particular resolve_symbol_value()'s handling of O_constant involves
going from expr_section to absolute_section. I cannot replace
expr_section there by undefined_section (or else, found the hard way,
at least all implicitly external symbols end up local absolute), but
clearly I also cannot simply remove that construct.

There are further places where already when doing the basic mechanical
change it seemed wrong to do that kind of replacement.

>  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?

The above may have to do with (at least) implicitly external symbols
not really being recorded as forward references. The forward_ref field
really is used for equates only afaict, and I don't think this can be
easily changed.

Jan

  parent reply	other threads:[~2022-08-12 11:20 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
2022-08-12 11:20   ` Jan Beulich [this message]
  -- 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=cae0b39e-c1fe-a50d-c85b-e3e36b1026c7@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).