diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-07-19 00:33:03 -0300 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2017-07-19 00:33:03 -0300 |
commit | 8f4ae1a6334fec17bdffa94e61b92630c6d9158c (patch) | |
tree | ab7b50e356a8f173fea11c69213b67a32e9c1985 | |
parent | 6ea166c2efd01e59fb52e74cfe4af2fd52b190b3 (diff) | |
download | gdb-8f4ae1a6334fec17bdffa94e61b92630c6d9158c.zip gdb-8f4ae1a6334fec17bdffa94e61b92630c6d9158c.tar.gz gdb-8f4ae1a6334fec17bdffa94e61b92630c6d9158c.tar.bz2 |
LVU: move leb128 undefined check to cvt_frag_to_fill
-rw-r--r-- | gas/write.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gas/write.c b/gas/write.c index b551afc..8efdbc5 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; |