]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Cast shift expression
authorAlan Modra <amodra@gmail.com>
Tue, 7 Apr 2015 01:09:59 +0000 (10:39 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 7 Apr 2015 13:51:42 +0000 (23:21 +0930)
PR ld/18176
* ldlang.c (lang_size_sections): Cast shift expression.

ld/ChangeLog
ld/ldlang.c

index befab2cfec9831c21f5be69d04c37fc55849b3fb..7468a7dcb9ea2039762d6ed3ea1620cfa66c5c77 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-07  Alan Modra  <amodra@gmail.com>
+
+       PR ld/18176
+       * ldlang.c (lang_size_sections): Cast shift expression.
+
 2015-04-07  Alan Modra  <amodra@gmail.com>
 
        * emultempl/ppc32elf.em: Handle --no-pic-fixup.
index 13e7b1a3b991f6849aad2290027467fb114a179a..cbd5bc3d017ac244642c3c3e2386828ca0971f01 100644 (file)
@@ -5424,7 +5424,7 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
             between sections won't change.  This is better than
             simply subtracting 1 << max_alignment_power which is
             what we used to do here.  */
-         expld.dataseg.base &= ~((1 << max_alignment_power) - 1);
+         expld.dataseg.base &= ~(((bfd_vma) 1 << max_alignment_power) - 1);
          /* It doesn't make much sense to go lower than the initial
             base.  That can only increase padding.  */
          if (expld.dataseg.base < initial_base)