This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
.org/.space backwards
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Wed, 1 May 2002 10:01:21 +0930
- Subject: .org/.space backwards
Stops gas/write.c:write_contents giving an internal error on this
assert:
count = f->fr_offset;
assert (count >= 0);
Since we've already emitted an error, let's not abort.
gas/ChangeLog
* write.c (cvt_frag_to_fill): Set fr_offset to zero on .org
backwards to prevent cascading errors.
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.53
diff -c -p -r1.53 write.c
*** gas/write.c 6 Mar 2002 04:59:35 -0000 1.53
--- gas/write.c 30 Apr 2002 16:13:56 -0000
*************** cvt_frag_to_fill (headersP, sec, fragP)
*** 527,532 ****
--- 527,533 ----
as_bad_where (fragP->fr_file, fragP->fr_line,
_("attempt to .org/.space backwards? (%ld)"),
(long) fragP->fr_offset);
+ fragP->fr_offset = 0;
}
fragP->fr_type = rs_fill;
break;
--
Alan Modra
IBM OzLabs - Linux Technology Centre