1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
authorIan Lance Taylor <ian@airs.com>
Sat, 26 Jun 1999 19:32:54 +0000 (19:32 +0000)
committerIan Lance Taylor <ian@airs.com>
Sat, 26 Jun 1999 19:32:54 +0000 (19:32 +0000)
* peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
as writable PE sections.

bfd/ChangeLog
bfd/peicode.h

index 4c3f774bb08da2f7afc6abdbdf8f594c0976629a..b4876195d4f04e89df87145e37a6b32e6de6c758 100644 (file)
@@ -1,3 +1,8 @@
+1999-06-26  Mumit Khan  <khan@xraylith.wisc.edu>
+
+       * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
+       as writable PE sections.
+
 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
 
        * dwarf2.c (struct arange): New type.
index be47bcac1fc3614ddaa19f4a3807fd581da5c4fc..299718855fedd762444ce394ad86576a992328fa 100644 (file)
@@ -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);
   }