From: Alexandre Oliva Date: Wed, 19 Jul 2017 03:33:03 +0000 (-0300) Subject: LVU: move leb128 undefined check to cvt_frag_to_fill X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f4ae1a6334fec17bdffa94e61b92630c6d9158c;p=thirdparty%2Fbinutils-gdb.git LVU: move leb128 undefined check to cvt_frag_to_fill --- diff --git a/gas/write.c b/gas/write.c index b551afcb1ca..8efdbc506f4 100644 --- a/gas/write.c +++ b/gas/write.c @@ -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;