From: Tristan Gingold Date: Fri, 25 Mar 2011 15:31:27 +0000 (+0000) Subject: 2011-03-25 Tristan Gingold X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf6b8767381694e7548c77d7aa3297f991e26f44;p=binutils-gdb.git 2011-03-25 Tristan Gingold * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only. Minor reordering. (alpha_vms_create_eisd_for_section): Make code sections read-only. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b4eaf7a5a00..33580ed5507 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2011-03-25 Tristan Gingold + + * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only. + Minor reordering. + (alpha_vms_create_eisd_for_section): Make code sections read-only. + 2011-03-24 Alan Modra * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index b8ae26d4618..adc8508cdc9 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. */