bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16821] x86_64 PE/COFF: ld truncates addresses of symbols from li


From: asmwarrior at gmail dot com
Subject: [Bug ld/16821] x86_64 PE/COFF: ld truncates addresses of symbols from linker scripts to 32 bit
Date: Tue, 15 Apr 2014 01:21:07 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16821



asmwarrior <asmwarrior at gmail dot com> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |asmwarrior at gmail dot com



--- Comment #8 from asmwarrior <asmwarrior at gmail dot com> ---

(In reply to Eric Botcazou from comment #7)

> This doesn't compile on 32-bit hosts:

> 

> peigen.c: In function ‘abs_finder’:

> peigen.c:215:3: error: left shift count >= width of type [-Werror]



I got the same build error on MinGW 32-bit hosts, the patch below fixes the

build failure.



Yuanhui Zhang





 bfd/peXXigen.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c

index 36d90cc..6d80f96 100644

--- a/bfd/peXXigen.c

+++ b/bfd/peXXigen.c

@@ -212,7 +212,7 @@ abs_finder (bfd * abfd ATTRIBUTE_UNUSED, asection * sec,

void * data)

 {

   bfd_vma abs_val = * (bfd_vma *) data;



-  return (sec->vma <= abs_val) && ((sec->vma + (1L << 32)) > abs_val);

+  return (sec->vma <= abs_val) && ((sec->vma + (1LL << 32)) > abs_val);

 }



 unsigned int



-- 

You are receiving this mail because:

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]