[PATCH] objcopy: fix 32-bit build

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] objcopy: fix 32-bit build

Jan Beulich-2
I do assume this isn't sufficient to address the non-64-bit-BFD case as
well, but it's not entirely clear what the right approach to deal with
that would be. I also wonder whether it was really meant to have 59 bits
set here, rather than 63.

binutils/
2018-01-10  Jan Beulich  <[hidden email]>

        * objcopy.c (merge_gnu_build_notes): Replace 64-bit constants by
        equivalent expressions.

--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2064,7 +2064,7 @@ merge_gnu_build_notes (bfd * abfd, asect
      For now though, since v1 and v2 was not intended to
      handle gaps, we chose an artificially large end
      address.  */
-  end = (bfd_vma) 0x7ffffffffffffffUL;
+  end = ~((bfd_vma)1 << 63);
   break;
   
  case 8:
@@ -2083,7 +2083,7 @@ merge_gnu_build_notes (bfd * abfd, asect
  For now though, since v1 and v2 was not intended to
  handle gaps, we chose an artificially large end
  address.  */
-      end = (bfd_vma) 0x7ffffffffffffffUL;
+      end = ~((bfd_vma)1 << 63);
     }
   break;