This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Minor fix to COFF .section change


> 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. Go with #1, but if it turns out to be a problem for a target, let it 
default to code.
2a. Let a target choose between defaulting to code or to data.

3. Recognize .eh_frame (as the .section doc allows) and set SEC_DATA for it.

My preference is for door #1 because  or door #2. Door #3 goes in the 
direction of 
automatically setting the right attributes for every special section there 
is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]