[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gas bug
From: |
Alan Modra |
Subject: |
Re: gas bug |
Date: |
Fri, 5 Oct 2001 20:13:37 +0930 |
User-agent: |
Mutt/1.3.17i |
On Thu, Oct 04, 2001 at 08:30:17PM +0200, Jakob Eriksson wrote:
>
> Found a bug in GAS!
Yep.
> This assembler was configured for a target of `m68k-coff'.
non-BFD assembler..
> address@hidden:/tmp/Accelerator$ m68k-coff-as --register-prefix-optional -al
> -m68332 -mno-68881 -I ./inc ./src/acc_csw.src -o acc_csw.obj --mri
> Segmentation fault
This will fix your particular problem.
* subseg.c (subseg_text_p): Return 0 for absolute section.
And this patch will catch similar problems.
* read.c (do_align): If in absolute section, warn about and
ignore non-zero fill pattern.
gas shouldn't be trying to create frags in the absolute section.
--
Alan Modra
Index: gas/subsegs.c
===================================================================
RCS file: /cvs/src/src/gas/subsegs.c,v
retrieving revision 1.9
diff -u -p -r1.9 subsegs.c
--- subsegs.c 2001/08/01 01:44:25 1.9
+++ subsegs.c 2001/10/05 10:22:22
@@ -587,7 +587,7 @@ subseg_text_p (sec)
#else /* ! BFD_ASSEMBLER */
const char * const *p;
- if (sec == data_section || sec == bss_section)
+ if (sec == data_section || sec == bss_section || sec == absolute_section)
return 0;
for (p = nontext_section_names; *p != NULL; ++p)
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.47
diff -u -p -r1.47 read.c
--- read.c 2001/09/19 05:33:19 1.47
+++ read.c 2001/10/05 10:22:22
@@ -1162,6 +1162,19 @@ do_align (n, fill, len, max)
int len;
int max;
{
+ if (now_seg == absolute_section)
+ {
+ if (fill != NULL)
+ while (len-- > 0)
+ if (*fill++ != '\0')
+ {
+ as_warn (_("ignoring fill value in absolute section"));
+ break;
+ }
+ fill = NULL;
+ len = 0;
+ }
+
#ifdef md_do_align
md_do_align (n, fill, len, max, just_record_alignment);
#endif
- gas bug, Jakob Eriksson, 2001/10/04
- Re: gas bug,
Alan Modra <=