https://sourceware.org/bugzilla/show_bug.cgi?id=27566
--- Comment #15 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nelson Chu <nelsonc1...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f8e75592ceb1e667fb50e466734caf6d11203ac commit 6f8e75592ceb1e667fb50e466734caf6d11203ac Author: Nelson Chu <nel...@rivosinc.com> Date: Fri May 12 17:15:58 2023 +0800 RISC-V: PR27566, consider ELF_MAXPAGESIZE/COMMONPAGESIZE for gp relaxations. For default linker script, if a symbol's value outsides the bounds of the defined section, then it may cross the data segment alignment, so we should reserve more size about MAXPAGESIZE and COMMONPAGESIZE when doing gp relaxations. Otherwise we may meet the truncated errors since the data segment alignment might move the section forward. bfd/ PR 27566 * elfnn-riscv.c (_bfd_riscv_relax_lui): Consider MAXPAGESIZE and COMMONPAGESIZE if the symbol's value outsides the bounds of the defined section. (_bfd_riscv_relax_pc): Likewise. ld/ PR 27566 * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated. * testsuite/ld-riscv-elf/relax-data-segment-align*: New testcase for pr27566. Without this patch, the rv32 binutils will meet truncated errors for this testcase. -- You are receiving this mail because: You are on the CC list for the bug.