public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: binutils <binutils@sourceware.org>
Subject: Re: [MIPS] Can we have R_MIPS_PC64?
Date: Wed, 8 Jul 2020 22:23:17 -0700	[thread overview]
Message-ID: <20200709052317.ef5ff6bm6athgbs6@gmail.com> (raw)
In-Reply-To: <20200219042647.rw2fdnb7gbtbmzbz@google.com>

On 2020-02-18, Fangrui Song wrote:
>On 2020-02-17, Maciej W. Rozycki wrote:
>>On Sat, 8 Feb 2020, Fangrui Song wrote:
>>
>>>I hope someone can add back R_MIPS_PC64.
>>
>>You don't need R_MIPS_PC64.  You can yield the same effect the usual
>>MIPS64 way, that is by composing R_MIPS_PC32 with R_MIPS_64 (similarly to
>>e.g. how R_MIPS_REL32 composes with R_MIPS_64).
>>
>>Of course the toolchain may not as it stands support this composition.
>>Feel free to post patches to take care of your use case.
>>
>>HTH,
>>
>> Maciej
>
>Thank you for your comments. Sorry that I cannot create a patch, as I know very little about MIPS.
>
>I raised these MIPS issues (including the recent DT_MIPS_XHASH
>https://sourceware.org/ml/binutils/2020-01/msg00451.html) not because I
>have anything to do with MIPS. I started the threads from the viewpoint
>of a toolchain maintainer.
>
>I noticed MIPS introduced complexity in a number of areas,
>where other architectures can share a simple common implementation.
>(It is weird that .quad foo - . is not representable on MIPS64.)
>
>For my own selfish purposes, I will be sad if someone wants to add some
>peculiar MIPS features (e.g. DT_MIPS_XHASH) to LLVM binary utilities or
>lld. I hope we can get rid of things like
>https://reviews.llvm.org/D72228 at some point.
>
>I hope someone can implement PC64, or something similar for MIPS.

Simon Atanasyan has implemented .quad foo-. via a chain of relocation
R_MIPS_PC32/R_MIPS_64/R_MIPS_NONE in LLVM's integrated assembler
(https://reviews.llvm.org/D80390 ). This will be available in LLVM/Clang 11.0.0

I created a feature request for GNU as:
https://sourceware.org/bugzilla/show_bug.cgi?id=26222

      reply	other threads:[~2020-07-09  5:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05  7:19 Fangrui Song
2020-02-05  9:00 ` Andrew Pinski
2020-02-05  9:04   ` Andrew Pinski
2020-02-05  9:10     ` Andrew Pinski
2020-02-05  9:16       ` Andrew Pinski
2020-02-08 18:40         ` Fangrui Song
2020-02-17 18:07           ` Maciej W. Rozycki
2020-02-19  4:26             ` Fangrui Song
2020-07-09  5:23               ` Fangrui Song [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=20200709052317.ef5ff6bm6athgbs6@gmail.com \
    --to=i@maskray.me \
    --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).