Fix a sanitization problem running the linker testsuite for the AArch64 target.
authorNick Clifton <nickc@redhat.com>
Wed, 26 Aug 2020 14:50:36 +0000 (15:50 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 26 Aug 2020 14:51:56 +0000 (15:51 +0100)
PR 26411
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
unsigned long constant when creating a mask to test for alignment
issues.

bfd/ChangeLog
bfd/elfnn-aarch64.c

index 988e2f0c649f68e7d4b1ca8784b5d247c1bb1e6b..bae3449fbe87dfe521f67b3cd3ee239aaf114f2f 100644 (file)
@@ -1,3 +1,10 @@
+2020-08-26  Nick Clifton  <nickc@redhat.com>
+
+       PR 26411
+       * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
+       unsigned long constant when creating a mask to test for alignment
+       issues.
+
 2020-08-26  Alan Modra  <amodra@gmail.com>
 
        PR 26507
index 9b0b51b4fb0199d39dd1c42a88646b4666bcdd78..302d8dd7e66a61fa51028302e9de2521a836812f 100644 (file)
@@ -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 & ((1 << howto->rightshift) - 1)
+             if (addend & ((1UL << howto->rightshift) - 1)
                  /* FIXME: Are we testing all of the appropriate reloc
                     types here ?  */
                  && (real_r_type == BFD_RELOC_AARCH64_LD_LO19_PCREL