This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 32 bit host build failure from peXXigen.c


Hi Edjunior,

Thank you for the patch, but unfortunately it still fails on my build

Ho hum.  OK - I have another patch for you to try...

I'm using gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5).

Ah - unfortunately I do not have access to a system with this version of gcc.


Please try the attached patch and let me know if I have gotten it right this time. :-)

Cheers
  Nick



diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index d462753..dc45daf 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -236,7 +236,15 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp)
      reduce the absolute value to < 1^32, and then transforming the
      symbol into a section relative symbol.  This of course is a hack.  */
   if (sizeof (in->n_value) > 4
+      /* GCC 4.6.x erroneously complains about the next test always being
+	 false when compiled on a 32-bit host.  (The sizeof test above
+	 should have made the warning unnecessary).  Hence we have to
+	 predicate the test.  It should not matter if the test is omitted
+	 since the worst that can happen is that some absolute symbols
+	 are needlessly converted to equivalent section relative symbols.  */
+#if defined BFD64 || ! defined __GNUC__ || __GNUC__ > 4 || __GNUC_MINOR__ > 6
       && in->n_value > ((1ULL << 32) - 1)
+#endif
       && in->n_scnum == -1)
     {
       asection * sec;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]