aboutsummaryrefslogtreecommitdiff
path: root/libsframe
diff options
context:
space:
mode:
authorNelson Chu <nelson@rivosinc.com>2023-05-26 18:05:34 +0800
committerNelson Chu <nelson@rivosinc.com>2023-06-01 12:23:49 +0800
commit20ef84ed2abb990da08d90e1c978f96d29f40606 (patch)
tree1c3e455f78f1beac5d44a49da1deda0257f6899b /libsframe
parent6313825cbf834b1852007707cfff2ccd3b0dbd6b (diff)
downloadbinutils-20ef84ed2abb990da08d90e1c978f96d29f40606.zip
binutils-20ef84ed2abb990da08d90e1c978f96d29f40606.tar.gz
binutils-20ef84ed2abb990da08d90e1c978f96d29f40606.tar.bz2
[PR ld/22263][PR ld/24676] RISC-V: Avoid spurious R_RISCV_NONE for TLS GD/IE.
For TLS GD/IE, add the same condition with the relocate_section in the allocate_dynrelocs, to make sure we won't reserve redundant spaces for dynamic relocations since the conservative estimatation. After applying this patch, ld seems no longer generate the spurious R_RISCV_NONE for pr22263-1 test, and the test in pr24676. bfd/ PR ld/22263 PR ld/24676 * elfnn-riscv.c (RISCV_TLS_GD_IE_NEED_DYN_RELOC): New defined. Set NEED_RELOC to true if TLS GD/IE needs dynamic relocations, and INDX will be the dynamic index. (allocate_dynrelocs): Don't reserve extra spaces in the rela.got if RISCV_TLS_GD_IE_NEED_DYN_RELOC set need_reloc to false. This condition needs to be same as relocate_section. (relocate_section): Likewise, use the same condition as allocate_dynrelocs.
Diffstat (limited to 'libsframe')
0 files changed, 0 insertions, 0 deletions