From 0fad6e4b94e754e26e904bab074bf6c94d825711 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 7 Apr 2015 10:39:59 +0930 Subject: [PATCH] Cast shift expression PR ld/18176 * ldlang.c (lang_size_sections): Cast shift expression. --- 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 + PR ld/18176 + * ldlang.c (lang_size_sections): Cast shift expression. + +2015-04-07 Alan Modra + * 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) -- 2.7.4