This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Minor fix to COFF .section change
- To: DJ Delorie <dj at delorie dot com>, binutils at sourceware dot cygnus dot com
- Subject: Re: Minor fix to COFF .section change
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Sun, 2 Jul 2000 01:08:17 -0400
- References: <395E6539.8406.8A0BBB@localhost> (snowball3@bigfoot.com)
> It seems we would have had this problem before. Why didn't it fail
> before?
We (as in DJGPP BTW) had this problem with !bfd gas where it thought the
.eh_frame section contained code and filled the section with nops and
equivalents. Now we have a similiar problem with bfd gas.
> I'm concerned that there may be software out there that may
> create a section, expecting it to be executable (the old way) but
> finding it's not (the new way).
I do belive the proposed new default matches the documentation, but I see
your
point. I looked through the GCC config files that define ASM_OUTPUT_SECTION,
but it wasn't much help because they all use pretty much the same in always
adding the attribute so there's never a doubt about what's intended. DJGPP
should do the same in gcc 3.0.
Anyway, as I see it there are several ways to go:
1. Go ahead and change the default attribute to match the docs.
2. Keep the current default, but let it be overridable by a target.
3. Recognize .eh_frame (as the .section doc allows) and set SEC_DATA for it.
My preference is for door #1 or door #2. Door #3 goes in the direction of
automatically setting the right attributes for every special section there
is.