This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]