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]

Re: Bug: gas crashes on invalid input with .offset pseudo op


Hi Johannes,

> I tried to assemble some third party code which contains something
> like:
> 	.offset 0x20
> 	.ascii "foobar"

Thanks for reporting this bug.  I have fixed it by applying the patch
below.  Now the assembler will report:

   Error: strings must be placed into a section
   Warning: rest of line ignored; first ignored character is `"'

Cheers
        Nick

2002-08-14  Nick Clifton  <nickc@redhat.com>

	* read.c (stringer): Catch attempts to create strings in the abs
	section.

Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.52
diff -c -3 -p -w -r1.52 read.c
*** gas/read.c	14 Jun 2002 14:08:51 -0000	1.52
--- gas/read.c	14 Aug 2002 16:34:23 -0000
*************** stringer (append_zero)		/* Worker to do 
*** 4564,4569 ****
--- 4565,4579 ----
      {
        c = ',';			/* Do loop.  */
      }
+   /* If we have been switched into the abs_section then we
+      will not have an obstack onto which we can hang strings.  */
+   if (now_seg == absolute_section)
+     {
+       as_bad (_("strings must be placed into a section"));
+       c = 0;
+       ignore_rest_of_line ();
+     }
+   
    while (c == ',' || c == '<' || c == '"')
      {
        SKIP_WHITESPACE ();


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