Fangrui Song maskray@google.com
Mon Aug 8 17:27:42 GMT 2022

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

Second this.

>> $ 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.

More information about the Binutils mailing list