aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-26 19:32:54 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-26 19:32:54 +0000
commit254f5c45f5f01c90f57506a10a349e867e3d100f (patch)
tree96c69a8b9a5f12e51267bd1c7c8ee15f6398e9ae
parenta340d27090bd75548ff484fbee052574b895f0b4 (diff)
downloadfsf-binutils-gdb-254f5c45f5f01c90f57506a10a349e867e3d100f.zip
fsf-binutils-gdb-254f5c45f5f01c90f57506a10a349e867e3d100f.tar.gz
fsf-binutils-gdb-254f5c45f5f01c90f57506a10a349e867e3d100f.tar.bz2
1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
* peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections as writable PE sections.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/peicode.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4c3f774..b487619 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/peicode.h b/bfd/peicode.h
index be47bca..2997188 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -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);
}