From: Mumit Khan <khan@xraylith.wisc.EDU>
To: Ian Lance Taylor <ian@zembu.com>
Cc: ts1@cma.co.jp, binutils@sourceware.cygnus.com
Subject: Re: patch for i386-pe section header [Re: section bug?]
Date: Thu, 01 Jul 1999 00:00:00 -0000 [thread overview]
Message-ID: <199906270213.VAA15952@mercury.xraylith.wisc.edu> (raw)
In-Reply-To: <19990627012422.14497.qmail@daffy.airs.com>
Ian Lance Taylor <ian@zembu.com> writes:
>
> In the second new line, shouldn't that be
> flags |= IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
> ?
>
> I would almost just check that in, but I thought I'd better check to
> see if I was missing something.
>
And I also forgot to diff the whole tree. Damn. Now it's tested on both
NT and W9x.
bfd/ChangeLog:
Sat Jun 26 21:09:44 1999 Mumit Khan <khan@xraylith.wisc.edu>
* peicode.h (coff_swap_scnhdr_out): Mark user-defined writable
sections as writable.
gas/ChangeLog:
Sat Jun 26 21:09:44 1999 Mumit Khan <khan@xraylith.wisc.edu>
* config/obj-coff.c (obj_coff_section): Mark writable sections
as data.
Index: bfd/peicode.h
===================================================================
RCS file: /cvs/binutils/binutils/bfd/peicode.h,v
retrieving revision 1.3
diff -u -3 -p -r1.3 peicode.h
--- bfd/peicode.h 1999/05/25 11:37:40 1.3
+++ bfd/peicode.h 1999/06/27 02:08:58
@@ -1235,7 +1235,11 @@ coff_swap_scnhdr_out (abfd, in, out)
else if (strcmp (scnhdr_int->s_name, ".rsrc") == 0)
flags |= IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_SHARED;
else
- flags |= IMAGE_SCN_MEM_READ;
+ {
+ flags |= IMAGE_SCN_MEM_READ;
+ if (! (flags & SEC_READONLY))
+ flags |= IMAGE_SCN_MEM_WRITE;
+ }
bfd_h_put_32(abfd, flags, (bfd_byte *) scnhdr_ext->s_flags);
}
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/obj-coff.c,v
retrieving revision 1.5
diff -u -3 -p -r1.5 obj-coff.c
--- gas/config/obj-coff.c 1999/06/19 14:04:44 1.5
+++ gas/config/obj-coff.c 1999/06/27 02:08:59
@@ -1247,7 +1247,7 @@ obj_coff_section (ignore)
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
case 'n': flags &=~ SEC_LOAD; break;
case 'd':
- case 'w': flags &=~ SEC_READONLY; break;
+ case 'w': flags |= SEC_DATA; flags &=~ SEC_READONLY; break;
case 'x': flags |= SEC_CODE; break;
case 'r': flags |= SEC_READONLY; break;
Regards,
Mumit
next prev parent reply other threads:[~1999-07-01 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-01 0:00 section bug? SONE Takeshi
1999-07-01 0:00 ` patch for i386-pe section header [Re: section bug?] Mumit Khan
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Mumit Khan [this message]
1999-07-01 0:00 ` Mumit Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199906270213.VAA15952@mercury.xraylith.wisc.edu \
--to=khan@xraylith.wisc.edu \
--cc=binutils@sourceware.cygnus.com \
--cc=ian@zembu.com \
--cc=ts1@cma.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).