diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-26 19:32:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-26 19:32:54 +0000 |
commit | fe285fb60466071db3d6d341fbb5c96a55187dcf (patch) | |
tree | 43c34f4dfd791d84e4da0252f4bcc4a358c26ede /bfd/peicode.h | |
parent | 937134d0201731dffc275092b0dc959ef9d2fca0 (diff) | |
download | gdb-fe285fb60466071db3d6d341fbb5c96a55187dcf.tar.gz |
1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
* peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
as writable PE sections.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index be47bcac1fc..299718855fe 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); } |