mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
RISC-V: Don't enable relaxation in relocatable link
PR ld/22949 * emultempl/riscvelf.em (riscv_elf_before_allocation): Don't enable relaxation in relocatable link.
This commit is contained in:
parent
f967164095
commit
202d116e57
@ -1,3 +1,9 @@
|
||||
2018-03-15 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
PR ld/22949
|
||||
* emultempl/riscvelf.em (riscv_elf_before_allocation): Don't
|
||||
enable relaxation in relocatable link.
|
||||
|
||||
2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
|
||||
|
||||
* emultempl/nds32elf.em (nds32_elf_after_allocation): Remove
|
||||
|
@ -33,11 +33,14 @@ riscv_elf_before_allocation (void)
|
||||
if (link_info.discard == discard_sec_merge)
|
||||
link_info.discard = discard_l;
|
||||
|
||||
/* We always need at least some relaxation to handle code alignment. */
|
||||
if (RELAXATION_DISABLED_BY_USER)
|
||||
TARGET_ENABLE_RELAXATION;
|
||||
else
|
||||
ENABLE_RELAXATION;
|
||||
if (!bfd_link_relocatable (&link_info))
|
||||
{
|
||||
/* We always need at least some relaxation to handle code alignment. */
|
||||
if (RELAXATION_DISABLED_BY_USER)
|
||||
TARGET_ENABLE_RELAXATION;
|
||||
else
|
||||
ENABLE_RELAXATION;
|
||||
}
|
||||
|
||||
link_info.relax_pass = 3;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user