aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-04-07 10:39:59 +0930
committerAlan Modra <amodra@gmail.com>2015-04-07 23:21:42 +0930
commit0fad6e4b94e754e26e904bab074bf6c94d825711 (patch)
tree828d1339ff99ae65273a5f88b3dd57f9690b8b34 /ld
parentd3e454b956b16d31998fec65a2508256e6357194 (diff)
downloadgdb-0fad6e4b94e754e26e904bab074bf6c94d825711.zip
gdb-0fad6e4b94e754e26e904bab074bf6c94d825711.tar.gz
gdb-0fad6e4b94e754e26e904bab074bf6c94d825711.tar.bz2
Cast shift expression
PR ld/18176 * ldlang.c (lang_size_sections): Cast shift expression.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c2
2 files changed, 6 insertions, 1 deletions
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)