[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: FW: gas m68k/MRI segfault
From: |
Smith, Gene |
Subject: |
RE: FW: gas m68k/MRI segfault |
Date: |
Thu, 19 Sep 2002 18:31:48 -0400 |
Nick,
I think my work around was to keep the offset section(s) 1st in the file. If
I had a code section followed by an offset section I got the crash. Or
something like that. I don't think it affects the functionality.
Still a bit unclear on one point: what is difference between rtems-as and
coff-as? Is it elf vs. coff, or something else?
-gene
> -----Original Message-----
> From: Nick Clifton [mailto:address@hidden
> Sent: Thursday, September 19, 2002 5:09 PM
> To: Smith, Gene
> Cc: address@hidden
> Subject: Re: FW: gas m68k/MRI segfault
>
>
> 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)
>