public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Fangrui Song <i@maskray.me>
Cc: binutils@sourceware.org
Subject: Re: Error for the second binding (.local/.weak/.globl)
Date: Thu, 26 Mar 2020 09:23:29 +1030	[thread overview]
Message-ID: <20200325225328.GH4583@bubble.grove.modra.org> (raw)
In-Reply-To: <20200325214622.kj3v3habvpgchtyv@gmail.com>

On Wed, Mar 25, 2020 at 02:46:22PM -0700, Fangrui Song wrote:
> On 2020-03-25, Alan Modra wrote:
> > On Tue, Mar 24, 2020 at 10:36:01PM -0700, Fangrui Song wrote:
> > > .weak (config/obj-elf.c) apparently overrides .globl (read.c) and .local
> > > (config/obj-elf.c) but this seems accidental rather than intentional.
> > 
> > No, it was deliberate.  git commit 5ca547dc239.
> 
> Ian does not remember what problems the commit fixed. He wouldn't have
> done it on a whim.

gas emitted an error prior to that patch.  Quite likely it was due to
gcc at that time emitting both .global and .weak, or .local and .weak,
under some condition.

> Maybe we can revisit the decision after 24 years.

I think it is completely fine for you to make the llvm assembler error
on inconsistent binding, or the last directive win.  Either of those
behaviours is logical and good, but you quite possibly will run into a
need to fix more user assembly.

I also think it OK to leave gas as is, given that we have been that
way for many years without complaint, but I won't object if one of the
other global maintainers thinks we should change.

-- 
Alan Modra
Australia Development Lab, IBM

      reply	other threads:[~2020-03-25 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  5:36 Fangrui Song
2020-03-25  8:41 ` Alan Modra
2020-03-25 21:46   ` Fangrui Song
2020-03-25 22:53     ` Alan Modra [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=20200325225328.GH4583@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    /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).