This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Cast shift expression
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 7 Apr 2015 13:52:49 -0000
- Subject: [binutils-gdb] Cast shift expression
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0fad6e4b94e754e26e904bab074bf6c94d825711
commit 0fad6e4b94e754e26e904bab074bf6c94d825711
Author: Alan Modra <amodra@gmail.com>
Date: Tue Apr 7 10:39:59 2015 +0930
Cast shift expression
PR ld/18176
* ldlang.c (lang_size_sections): Cast shift expression.
Diff:
---
ld/ChangeLog | 5 +++++
ld/ldlang.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index befab2c..7468a7d 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
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.
(params): Init new field.
(ppc_before_allocation): Enable relaxation for pic_fixup.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 13e7b1a..cbd5bc3 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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)