This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch]: Support coff noread flag for segments
2009/5/16 Dave Korn <dave.korn.cygwin@googlemail.com>:
> Kai Tietz wrote:
>
>>
>> So, here the adjusted patch. I tested it for cygwin and mingw. Ok for apply?
>
> ?No, I'm afraid not. ?This doesn't appear to be a real patch, it looks like
> you manually edited the previous one. ?It doesn't apply and in fact patch
> thinks that the third hunk is part of a separate diff altogether, probably
> owing to the duplicated "case 'l'" line in the supposedly-unedited part of the
> second hunk. ?Also the 'y' comment in the first hunk doesn't line up right any
> more. ?Please regenerate it properly, and re-run the tests on any one platform
> that is most convenient for you, using the *exact* same code that you then use
> for "cvs diff" and propose to subsequently "cvs checkin".
>
> ? ?cheers,
> ? ? ?DaveK
>
Sorry, I copied it from console output and therefore things got
corrupt. Patch is appended to this mail as attachment.
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
Index: obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.94
diff -u -r1.94 obj-coff.c
--- obj-coff.c 4 Oct 2007 17:05:37 -0000 1.94
+++ obj-coff.c 16 May 2009 19:57:42 -0000
@@ -1475,6 +1475,7 @@
'x' for text
'r' for read-only data
's' for shared data (PE)
+ 'y' for noread
But if the argument is not a quoted string, treat it as a
subsegment number.
@@ -1584,6 +1585,10 @@
flags |= SEC_READONLY;
break;
+ case 'y':
+ flags |= SEC_COFF_NOREAD | SEC_READONLY;
+ break;
+
case 'i': /* STYP_INFO */
case 'l': /* STYP_LIB */
case 'o': /* STYP_OVER */
@@ -1628,7 +1633,8 @@
/* This section's attributes have already been set. Warn if the
attributes don't match. */
flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_DATA | SEC_COFF_SHARED | SEC_NEVER_LOAD);
+ | SEC_DATA | SEC_COFF_SHARED | SEC_NEVER_LOAD
+ | SEC_COFF_NOREAD);
if ((flags ^ oldflags) & matchflags)
as_warn (_("Ignoring changed section attributes for %s"), name);
}