From 2f26cc79ccd114c46d781507fbefc2487ced54b2 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 2 Sep 2020 09:59:16 +0930 Subject: [PATCH] ubasn: elf32-pru.c:570 left shift of negative value * elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned type for "relocation". --- bfd/ChangeLog | 5 +++++ bfd/elf32-pru.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4c152f51830..d45c0e8bee2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-09-02 Alan Modra + + * elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned + type for "relocation". + 2020-09-01 Alan Modra * reloc.c (N_ONES): Handle N=0. diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c index bc44a1bd126..9848871e62c 100644 --- a/bfd/elf32-pru.c +++ b/bfd/elf32-pru.c @@ -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; -- 2.30.2