public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: binutils@sourceware.org
To: gingold@adacore.com
Subject: binutils-2_28-branch, master: Don't use "_gp" on RISC-V, use "_global_pointer$" instead
Date: Fri, 10 Feb 2017 02:13:00 -0000	[thread overview]
Message-ID: <20170210021242.14772-1-palmer@dabbelt.com> (raw)

This was one of the things Andrew and I found during our pre-upstreaming code
review, but we forgot about it.  I was recently cleaning up the bugs in our
Github bug tracker and found it, and I thought it would be worth proposing a
fix here.

The issue is that we use the "_gp" symbol to store the global pointer, which
can conflict with ABI-complient code on RISC-V (it's not in any namespace or
anything).  This was copied from MIPS, so hopefully it's not going to break
real programs, but we thought that we should try and fix it while we still can.

This will break the RISC-V ABI, but my understanding is that is still OK
because we haven't released yet.  That means we _need_ to get this on the 2.28
branch if it lands on master, which is why I've added Tristan Gingold and the
binutils-2_28-branch tag even though this hasn't made it to master yet.

This patch passes all my test cases, and Andrew and I approve of it.  I'm
mostly wondering if this is still OK to change in our port, and if it's OK for
2.28.

Sorry for the trouble!

[PATCH] Don't use "_gp" on RISC-V, use "_global_pointer$" instead

             reply	other threads:[~2017-02-10  2:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  2:13 Palmer Dabbelt [this message]
2017-02-10  2:13 ` [PATCH] " Palmer Dabbelt
2017-02-10  8:28 ` binutils-2_28-branch, master: " Tristan Gingold
2017-02-13 17:55   ` Palmer Dabbelt

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=20170210021242.14772-1-palmer@dabbelt.com \
    --to=palmer@dabbelt.com \
    --cc=binutils@sourceware.org \
    /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).