[PATCH] RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY

Kito Cheng kito.cheng@gmail.com
Mon Aug 8 15:47:18 GMT 2022


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.

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


More information about the Binutils mailing list