ubasn: elf32-pru.c:570 left shift of negative value

* elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned
	type for "relocation".
This commit is contained in:
Alan Modra 2020-09-02 09:59:16 +09:30
parent f6e6b05211
commit 2f26cc79cc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-09-02 Alan Modra <amodra@gmail.com>
* elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned
type for "relocation".
2020-09-01 Alan Modra <amodra@gmail.com>
* reloc.c (N_ONES): Handle N=0.

View File

@ -539,7 +539,7 @@ pru_elf32_do_ldi32_relocate (bfd *abfd, reloc_howto_type *howto,
bfd_byte *data, bfd_vma offset,
bfd_vma symbol_value, bfd_vma addend)
{
bfd_signed_vma relocation;
bfd_vma relocation;
bfd_size_type octets = offset * OCTETS_PER_BYTE (abfd, input_section);
bfd_byte *location;
unsigned long in1, in2;