This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] Don't mark NOLOAD sections as READ or WRITE on PE targets
On Thu, Jun 09, 2005 at 01:41:19PM +0100, Nick Clifton wrote:
>>2005-06-08 Christopher Faylor
>>
>> * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
>> section header. Do not add STYP_NOLOAD since it does not appear to be
>> a valid PE flag.
>
>Approved - please apply.
I've applied this and also have taken the liberty of adding the below patch
since my previous change wasn't quite good enough for catching all cases
where a section is intended to be loaded into memory.
cgf
2005-06-09 Christopher Faylor
* coffcode.h (sec_to_styp_flags): Set appropriate section flags when
either SEC_ALLOC OR SEC_LOAD.
Index: coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -p -r1.126 -r1.127
--- coffcode.h 9 Jun 2005 14:40:50 -0000 1.126
+++ coffcode.h 9 Jun 2005 19:22:15 -0000 1.127
@@ -560,7 +560,7 @@ sec_to_styp_flags (const char *sec_name,
/* skip LINK_DUPLICATES */
/* skip LINKER_CREATED */
- if (sec_flags & SEC_ALLOC)
+ if (sec_flags & (SEC_ALLOC | SEC_LOAD))
{
/* For now, the read/write bits are mapped onto SEC_READONLY, even
though the semantics don't quite match. The bits from the input