PR27597, nios: assertion fail in nios2_elf32_install_imm16
The assertion in nios2_elf32_install_imm16 triggers when the PLT is
twice the maximum allowable size for a branch from PLTn to reach
.PLTresolve, and on no other call to nios2_elf32_install_imm16. That
makes the assertion completely useless. We can handle a PIC PLT
exceeding 0x8000 in size by bouncing branches that won't reach through
previous branches.
PR 27597
* elf32-nios2.c (nios2_elf32_install_imm16): Delete BFD_ASSERT.
(nios2_build_one_stub): Don't bother masking value passed to
nios2_elf32_install_imm16.
(nios2_elf32_finish_dynamic_symbol): Likewise. Handle overflow
of PLTn branch to .PLTresolve by bouncing through prior branches.