diff options
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/write.c b/gas/write.c index 9a99a0f5ae..d570b6f5ba 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2692,7 +2692,11 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass) know (fragP->fr_next); after = fragP->fr_next->fr_address + stretch; growth = target - after; - if (growth < 0) + + /* Growth may be negative, but variable part of frag + cannot have fewer than 0 chars. That is, we can't + .org backwards. */ + if (address + fragP->fr_fix > target) { growth = 0; @@ -2714,9 +2718,6 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass) break; } - /* Growth may be negative, but variable part of frag - cannot have fewer than 0 chars. That is, we can't - .org backwards. */ as_bad_where (fragP->fr_file, fragP->fr_line, _("attempt to move .org backwards")); |