[PATCH v2] RISC-V: hash with segment id and pcrel_hi address while recording pcrel_hi
Jan Beulich
jbeulich@suse.com
Thu Jul 4 06:45:55 GMT 2024
On 04.07.2024 03:56, lifang_xia@linux.alibaba.com wrote:
> --- a/gas/config/tc-riscv.c
> +++ b/gas/config/tc-riscv.c
> @@ -1784,6 +1784,7 @@ init_opcode_hash (const struct riscv_opcode *opcodes,
> help us resolve the corresponding low-part relocation later. */
> typedef struct
> {
> + segT seg;
Just one minor comment here: segT really being asection *, I think it would
be desirable to use const asection * here instead, to clarify that there's
no intent of changing the referenced section. Not using the pre-cooked segT
may not be very nice, but (a) there's precedent (obj-elf.c:match_section())
and (b) I think const-correctness is more important overall.
In the end it'll be Nelson anyway to approve the change.
Jan
More information about the Binutils
mailing list