commit c6261a00c3e70dd8e508062ea43a1bcb6d547621
Author: Jim Wilson <email address hidden>
Date: Tue Nov 12 15:50:48 2019 -0800
RISC-V: Fix ld relax failure with calls and align directives.
Make _bfd_riscv_relax_call handle section alignment padding same as
the _bfd_riscv_relax_lui and _bfd_riscv_relax_pc functions already
do. Use the max section alignment if section boundaries are crossed,
otherwise the alignment of the containing section.
bfd/
PR 25181
* elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
foff. If sym_sec->output_section and sec->output_section are the same
and not *ABS* then set max_alignment to that section's alignment.
ld/
PR 25181
* testsuite/ld-riscv-elf/call-relax-0.s: New file.
* testsuite/ld-riscv-elf/call-relax-1.s: New file.
* testsuite/ld-riscv-elf/call-relax-2.s: New file.
* testsuite/ld-riscv-elf/call-relax-3.s: New file.
* testsuite/ld-riscv-elf/call-relax.d: New test.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run call-relax test.
The master branch has been updated by Jim Wilson <email address hidden>:
https:/ /sourceware. org/git/ gitweb. cgi?p=binutils- gdb.git; h=c6261a00c3e70 dd8e508062ea43a 1bcb6d547621
commit c6261a00c3e70dd 8e508062ea43a1b cb6d547621
Author: Jim Wilson <email address hidden>
Date: Tue Nov 12 15:50:48 2019 -0800
RISC-V: Fix ld relax failure with calls and align directives.
Make _bfd_riscv_ relax_call handle section alignment padding same as relax_lui and _bfd_riscv_relax_pc functions already
the _bfd_riscv_
do. Use the max section alignment if section boundaries are crossed,
otherwise the alignment of the containing section.
bfd/ relax_call) : Always add max_alignment to >output_ section and sec->output_section are the same
PR 25181
* elfnn-riscv.c (_bfd_riscv_
foff. If sym_sec-
and not *ABS* then set max_alignment to that section's alignment.
ld/ ld-riscv- elf/call- relax-0. s: New file. ld-riscv- elf/call- relax-1. s: New file. ld-riscv- elf/call- relax-2. s: New file. ld-riscv- elf/call- relax-3. s: New file. ld-riscv- elf/call- relax.d: New test. ld-riscv- elf/ld- riscv-elf. exp: Run call-relax test.
PR 25181
* testsuite/
* testsuite/
* testsuite/
* testsuite/
* testsuite/
* testsuite/
Change-Id: Iaf65cee52345ab f1955f36e8e72c4 f6cc0db8d9a