x86: limit 32-bit @size overflow checks to 64-bit objects
authorJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:39:11 +0000 (10:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:39:11 +0000 (10:39 +0200)
For 32-bit objects the behavior should not be dependent upon the build
being a BFD64 one.

gas/ChangeLog
gas/config/tc-i386.c

index 1e056f7f8ff503ae4050503057e718e0d5e6f53e..93b3fa67276af19ad255e99f0e15a7bcb8dd1e96 100644 (file)
@@ -1,3 +1,8 @@
+2021-04-26  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (tc_gen_reloc): Limit BFD_RELOC_SIZE32
+       overflow check to 64-bit objects.
+
 2021-04-26  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (want_disp32): Also check for SIZE32.
index 116b9db518fd9d8d259693ef64763cab38fe323f..147c8204b607edff414146dfb778378e29f193a6 100644 (file)
@@ -14212,6 +14212,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
             the symbol plus addend.  */
          valueT value = S_GET_SIZE (fixp->fx_addsy) + fixp->fx_offset;
          if (fixp->fx_r_type == BFD_RELOC_SIZE32
+             && object_64bit
              && !fits_in_unsigned_long (value))
            as_bad_where (fixp->fx_file, fixp->fx_line,
                          _("symbol size computation overflow"));
This page took 0.03005 seconds and 4 git commands to generate.