]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LVU: move leb128 undefined check to cvt_frag_to_fill
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 19 Jul 2017 03:33:03 +0000 (00:33 -0300)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 19 Jul 2017 03:33:03 +0000 (00:33 -0300)
gas/write.c

index b551afcb1ca6e16b104256b55393e182e46e036e..8efdbc506f411d9fb3b5278cf2ef894ec0f965ba 100644 (file)
@@ -465,6 +465,13 @@ cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP)
        valueT value = S_GET_VALUE (fragP->fr_symbol);
        int size;
 
+       if (!S_IS_DEFINED (fragP->fr_symbol))
+         {
+           as_bad_where (fragP->fr_file, fragP->fr_line,
+                         _("leb128 operand is an undefined symbol: %s"),
+                         S_GET_NAME (fragP->fr_symbol));
+         }
+
        size = output_leb128 (fragP->fr_literal + fragP->fr_fix, value,
                              fragP->fr_subtype);
 
@@ -2451,13 +2458,6 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
 #endif
 
        case rs_leb128:
-         if (pass == 0 && !S_IS_DEFINED (fragP->fr_symbol))
-             {
-               as_bad_where (fragP->fr_file, fragP->fr_line,
-                             _("leb128 operand is an undefined symbol: %s"),
-                             S_GET_NAME (fragP->fr_symbol));
-             }
-
          /* Initial guess is always 1; doing otherwise can result in
             stable solutions that are larger than the minimum.  */
          address += fragP->fr_offset = 1;