diff options
author | Lifang Xia <lifang_xia@linux.alibaba.com> | 2024-07-04 09:56:07 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2024-07-04 21:36:21 +0800 |
commit | f9d218de5c7b2eeeca9b32c9222a63c7376a8ddd (patch) | |
tree | 3611591ef0b8efcef3defd6c66608552f7fec7c7 /gas/ChangeLog-9697 | |
parent | 433e2bef4a9e2fcba9c4005db6fb692496c0b135 (diff) | |
download | binutils-f9d218de5c7b2eeeca9b32c9222a63c7376a8ddd.zip binutils-f9d218de5c7b2eeeca9b32c9222a63c7376a8ddd.tar.gz binutils-f9d218de5c7b2eeeca9b32c9222a63c7376a8ddd.tar.bz2 |
RISC-V: hash with segment id and pcrel_hi address while recording pcrel_hi
When the same address across different segments (sections) needs to be
recorded, it will overwrite the slot, leading to a memory leak. To ensure
uniqueness, the segment (section) ID needs to be included in the hash key
calculation.
gas/
* config/tc-riscv.c (riscv_pcrel_hi_fixup): New "const asection *sec".
(riscv_pcrel_fixup_hash): make sec->id and e->adrsess as the
hash key.
(riscv_pcrel_fixup_eq): Check sec->id at first.
(riscv_record_pcrel_fixup): New member "sec".
(md_apply_fix) <case BFD_RELOC_RISCV_PCREL_HI20>: Likewise.
(md_apply_fix) <case BFD_RELOC_RISCV_PCREL_LO12_I>: Likewise.
Diffstat (limited to 'gas/ChangeLog-9697')
0 files changed, 0 insertions, 0 deletions