bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: gas m68k/MRI segfault


From: Nick Clifton
Subject: Re: FW: gas m68k/MRI segfault
Date: 19 Sep 2002 22:09:04 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

Hi Gene,

> I used this:
>  m68k-rtems-as --mri filename

That was the key.  The problem only occurs with m68k-rtems-as not
m68k-coff-as.

Please try the attached patch.  With it you should see these error
messages:

  Error: cannot define symbol `cREGS' in absolute section
  Error: missing label
  Warning: rest of line ignored; first ignored character is `D'

I am not sure if this is what you would expect, but at least the
assembler does not crash now.

The problem is that the OFFSET directive changes the current section
to be the absolute section.  This is a special section used for
holding constants and so on, and it has no memory allocated to it for
a symbol table.  So cREGS definition attempted to create a symbol but
there was no memory allocated for it, and bingo - core dump.

I am not familair with the MRI syntax and whether the OFFSET directive
is behaving correctly, but this is what it currently does.

Cheers
        Nick

2002-09-19  Nick Clifton  <address@hidden>

        * symbols.c (colon): Do not allow symbols to be created in the
        absolute section.

Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.37
diff -c -3 -p -w -r1.37 symbols.c
*** gas/symbols.c       5 Sep 2002 00:01:15 -0000       1.37
--- gas/symbols.c       19 Sep 2002 21:02:42 -0000
*************** colon (sym_name)                /* Just seen "x:" - ra
*** 287,292 ****
--- 287,298 ----
  {
    register symbolS *symbolP;  /* Symbol we are working with.  */
  
+   if (now_seg == absolute_section)
+     {
+       as_bad (_("cannot define symbol `%s' in absolute section"), sym_name);
+       return NULL;
+     }
+ 
      /* Sun local labels go out of scope whenever a non-local symbol is
       defined.  */
    if (LOCAL_LABELS_DOLLAR)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]