diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:03:14 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:42 +0930 |
commit | 26009aa7639bb4103291bb79743dc4e51175f80a (patch) | |
tree | 972cc10860192a2edad3f391e4a0c030740fad34 /bfd/elfnn-aarch64.c | |
parent | 2f26cc79ccd114c46d781507fbefc2487ced54b2 (diff) | |
download | gdb-26009aa7639bb4103291bb79743dc4e51175f80a.zip gdb-26009aa7639bb4103291bb79743dc4e51175f80a.tar.gz gdb-26009aa7639bb4103291bb79743dc4e51175f80a.tar.bz2 |
ubsan elfnn-aarch64.c:7142 shift exponent 32 is too large
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Correct type
of constant shifted left.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 302d8dd..5b4c189 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -7139,7 +7139,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, Try to catch this situation here and provide a more helpful error message to the user. */ - if (addend & ((1UL << howto->rightshift) - 1) + if (addend & (((bfd_vma) 1 << howto->rightshift) - 1) /* FIXME: Are we testing all of the appropriate reloc types here ? */ && (real_r_type == BFD_RELOC_AARCH64_LD_LO19_PCREL |