aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms-alpha.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-03-25 15:31:27 +0000
committerTristan Gingold <gingold@adacore.com>2011-03-25 15:31:27 +0000
commitcf6b8767381694e7548c77d7aa3297f991e26f44 (patch)
tree08a34af21586c08cee14b588db4d6fe5425a025e /bfd/vms-alpha.c
parent467c65bce26d4c5739239809564a7c81a7b1eba2 (diff)
downloadgdb-cf6b8767381694e7548c77d7aa3297f991e26f44.zip
gdb-cf6b8767381694e7548c77d7aa3297f991e26f44.tar.gz
gdb-cf6b8767381694e7548c77d7aa3297f991e26f44.tar.bz2
2011-03-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (evax_section_flags): Make $CODE$ section read-only. Minor reordering. (alpha_vms_create_eisd_for_section): Make code sections read-only.
Diffstat (limited to 'bfd/vms-alpha.c')
-rw-r--r--bfd/vms-alpha.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index b8ae26d..adc8508 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -945,19 +945,19 @@ static const struct sec_flags_struct evax_section_flags[] =
0 },
{ EVAX_CODE_NAME,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_EXE,
- SEC_CODE,
+ SEC_CODE | SEC_READONLY,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_EXE,
- SEC_CODE | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
+ SEC_CODE | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ EVAX_LITERAL_NAME,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_RD | EGPS__V_NOMOD,
SEC_DATA | SEC_READONLY,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_RD,
- SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD },
+ SEC_DATA | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ EVAX_LINK_NAME,
EGPS__V_REL | EGPS__V_RD,
SEC_DATA | SEC_READONLY,
EGPS__V_REL | EGPS__V_RD,
- SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD },
+ SEC_DATA | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ EVAX_DATA_NAME,
EGPS__V_REL | EGPS__V_RD | EGPS__V_WRT | EGPS__V_NOMOD,
SEC_DATA,
@@ -972,12 +972,12 @@ static const struct sec_flags_struct evax_section_flags[] =
EGPS__V_PIC | EGPS__V_REL | EGPS__V_RD,
SEC_DATA | SEC_READONLY,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_RD,
- SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD },
+ SEC_DATA | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ EVAX_READONLY_NAME,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_RD | EGPS__V_NOMOD,
SEC_DATA | SEC_READONLY,
EGPS__V_PIC | EGPS__V_REL | EGPS__V_SHR | EGPS__V_RD,
- SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD },
+ SEC_DATA | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ EVAX_LOCAL_NAME,
EGPS__V_REL | EGPS__V_RD | EGPS__V_WRT,
SEC_DATA,
@@ -987,7 +987,7 @@ static const struct sec_flags_struct evax_section_flags[] =
EGPS__V_PIC | EGPS__V_OVR,
SEC_DATA | SEC_READONLY,
EGPS__V_PIC | EGPS__V_OVR,
- SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD },
+ SEC_DATA | SEC_READONLY | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD },
{ NULL,
EGPS__V_REL | EGPS__V_RD | EGPS__V_WRT,
SEC_DATA,
@@ -2901,7 +2901,7 @@ alpha_vms_create_eisd_for_section (bfd *abfd, asection *sec)
if (sec->flags & SEC_CODE)
eisd->u.eisd.flags |= EISD__M_EXE;
- else if (!(sec->flags & SEC_READONLY))
+ if (!(sec->flags & SEC_READONLY))
eisd->u.eisd.flags |= EISD__M_WRT | EISD__M_CRF;
/* If relocations or fixup will be applied, make this isect writeable. */