[vms/committed] Do not make CODE sections writable

Tristan Gingold gingold@adacore.com
Wed Aug 4 09:06:00 GMT 2010


Hi,

a one word patch to prevent CODE sections from being writable in bfd outputs.

Tristan.

bfd/
2010-08-04  Tristan Gingold  <gingold@adacore.com>

	* vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
	CODE sections writable.

diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 916c279..1f6e97f 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -2901,7 +2901,7 @@ alpha_vms_create_eisd_for_section (bfd *abfd, asection *se
 
   if (sec->flags & SEC_CODE)
     eisd->u.eisd.flags |= EISD__M_EXE;
-  if (!(sec->flags & SEC_READONLY))
+  else if (!(sec->flags & SEC_READONLY))
     eisd->u.eisd.flags |= EISD__M_WRT | EISD__M_CRF;
 
   if (!(sec->flags & SEC_LOAD))



More information about the Binutils mailing list