[PATCH v2] RISC-V: hash with segment id and pcrel_hi address while recording pcrel_hi
Nelson Chu
nelson@rivosinc.com
Thu Jul 4 09:18:27 GMT 2024
The const asection * sounds reasonable and good to me, thanks for the
suggestion :-)
Nelson
On Thu, Jul 4, 2024 at 2:46 PM Jan Beulich <jbeulich@suse.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240704/84451c53/attachment-0001.htm>
More information about the Binutils
mailing list