Minor fix to COFF .section change

Mark E. snowball3@bigfoot.com
Sun Jul 2 07:08:00 GMT 2000


> 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.



More information about the Binutils mailing list