Correct R_SH_IND12W handling
authorAlan Modra <amodra@gmail.com>
Wed, 27 Nov 2019 00:21:27 +0000 (10:51 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 27 Nov 2019 01:28:17 +0000 (11:58 +1030)
commit96e2dbda089775359b130e16a337c169d67abc6b
treebf6bd5d7b9411b4a1e58d7f232ec0ebc866348c0
parent855bae2c96421af06af9c77ed9b94b3dea5ae016
Correct R_SH_IND12W handling

Using bfd_vma for insn is to avoid having to worry about sign
propagation in expressions involving insn and sym_value when bfd_vma
is not the same as unsigned long.

* elf32-sh.c (sh_reloc): Use a bfd_vma insn.
(sh_reloc <R_SH_IND12W>): Divide calculated relocation value
by two before applying to insn.  Correct overflow test.
* coff-sh.c (sh_reloc): Likewise.
bfd/ChangeLog
bfd/coff-sh.c
bfd/elf32-sh.c
This page took 0.023597 seconds and 4 git commands to generate.