diff options
author | Nick Clifton <nickc@redhat.com> | 2023-04-17 17:19:21 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-04-17 17:19:21 +0100 |
commit | c53c6186c8d69586a71a7f8284a9ed7fa8cb207f (patch) | |
tree | 71a40fd46545428320c76b8f055d27e3853d419e /binutils | |
parent | fb12bc1e8e7c5246e4eabcebdb4644c43bc7e6b9 (diff) | |
download | gdb-c53c6186c8d69586a71a7f8284a9ed7fa8cb207f.zip gdb-c53c6186c8d69586a71a7f8284a9ed7fa8cb207f.tar.gz gdb-c53c6186c8d69586a71a7f8284a9ed7fa8cb207f.tar.bz2 |
Make the .rsrc section read only.
PR 30142
* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable.
* rescoff.c (write_coff_file): Add the SEC_READONLY flag to the .rsrc section.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/rescoff.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3b6f045..f705b6c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2023-04-17 Nick Clifton <nickc@redhat.com> + + PR 30142 + * rescoff.c (write_coff_file): Add the SEC_READONLY flag to the + .rsrc section. + 2023-04-11 Nick Clifton <nickc@redhat.com> PR 30327 diff --git a/binutils/rescoff.c b/binutils/rescoff.c index 40a8f45..5a99a28 100644 --- a/binutils/rescoff.c +++ b/binutils/rescoff.c @@ -477,7 +477,7 @@ write_coff_file (const char *filename, const char *target, sec = bfd_make_section_with_flags (abfd, ".rsrc", (SEC_HAS_CONTENTS | SEC_ALLOC - | SEC_LOAD | SEC_DATA)); + | SEC_LOAD | SEC_DATA | SEC_READONLY)); if (sec == NULL) bfd_fatal ("bfd_make_section"); |