public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: binutils@sourceware.org
Cc: Kito Cheng <kito.cheng@gmail.com>,
	schwab@suse.de, kito.cheng@sifive.com,  binutils@sourceware.org
Subject: Re: [PATCH] RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY
Date: Mon, 08 Aug 2022 11:33:15 -0700 (PDT)	[thread overview]
Message-ID: <mhng-c2e2a74f-4921-4ec5-b8b7-1332c1f8bf7a@palmer-ri-x1c9> (raw)
In-Reply-To: <20220808172742.vlbb5hpr7yqh5led@google.com>

On Mon, 08 Aug 2022 10:27:42 PDT (-0700), binutils@sourceware.org wrote:
> On 2022-08-08, Kito Cheng wrote:
>>Hi Andreas:
>>
>>> FWIW, they are still generically handled by the .vtable_inherit and
>>> .vtable_entry pseudo-ops, but support for -fvtable-gc has been removed
>>> from gcc in 2003.  The RISC-V assembler never picked them up.
>>
>>Thanks for the historical data! RISC-V GNU toolchain is upstreamed
>>after that time, so sounds like we could remove that safely for
>>RISC-V.
>
> Second this.

Given the age I'm assuming LLVM never supported this on RISC-V either, 
so this seems reasonable to me.

IMO we can't re-use the relocation numbers, so maybe we should leave 
some sort of deprecated stub in there just in case?  Not sure that's 
even worth it in this case, though.

>>> $ riscv64-suse-linux-as vtable.s
>>> vtable.s: Assembler messages:
>>> vtable.s:1: Error: cannot represent BFD_RELOC_VTABLE_ENTRY relocation in object file
>>> vtable.s:2: Error: cannot represent BFD_RELOC_VTABLE_INHERIT relocation in object file
>>
>>Maybe we can improve the error message into something like:
>>.vtable_inherit / .vtable_entry is unsupported for RISC-V.
>
> I think the diagnostic is from gas/config/tc-riscv.c:4135 .
> Since gcc -fvtable-gc was gone in 2003 and we essentially cannot find
> .vtable_entry uses, I think sticking with the existing generic diagnostic isn't bad.

  reply	other threads:[~2022-08-08 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  6:55 Fangrui Song
2022-08-08  7:36 ` Nelson Chu
2022-08-08  8:02 ` Andreas Schwab
2022-08-08 15:47   ` Kito Cheng
2022-08-08 17:27     ` Fangrui Song
2022-08-08 18:33       ` Palmer Dabbelt [this message]
2022-08-10  6:33       ` Fangrui Song
2022-08-10 13:22         ` Kito Cheng

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=mhng-c2e2a74f-4921-4ec5-b8b7-1332c1f8bf7a@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=binutils@sourceware.org \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=schwab@suse.de \
    /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).