summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMickael Guene <mickael.guene@st.com>2016-01-20 12:53:50 +0000
committerNick Clifton <nickc@redhat.com>2016-01-20 12:53:50 +0000
commit91f68a68f992e3f6c3da26c616b5257230bd1eec (patch)
tree9e549da0d8aaacafb6231069425241f003357a14 /bfd
parentbe56871ee8f65c51b9eee611532ed036a71a72e0 (diff)
Add support for an ARM specific 'y' section attribute flag to mark the section as NOREAD.
bfd/ChangeLog: * elf32-arm.c ((elf32_arm_special_sections): Remove catch of noread section using '.text.noread' pattern. gas/ChangeLog: * config/obj-elf.c (obj_elf_change_section) : Allow arm section with SHF_ARM_NOREAD section flag. * config/tc-arm.h (md_elf_section_letter) : Implement this hook to handle letter 'y'. (arm_elf_section_letter) : Declare it. * config/tc-arm.c (arm_elf_section_letter): Handle letter 'y' to set SHF_ARM_NOREAD section flag. * doc/c-arm.texi (ARM section attribute 'y'): Document it. gas/testsuite/ChangeLog: * gas/arm/section-execute-only.s: New test case. * gas/arm/section-execute-only.d: Expected output. ld/testsuite/ChangeLog: * ld-arm/thumb1-noread-not-present-mixing-two-section.s: Add 'y' attribute usage. * ld-arm/thumb1-noread-present-one-section.s: Likewise. * ld-arm/thumb1-noread-present-two-section.s: Likewise. * ld-arm/thumb1-input-section-flag-match.s: Likewise. binutils/ChangeLog: * readelf.c (get_elf_section_flags): Display y letter for section with SHF_ARM_NOREAD section flag in readelf section output. (process_section_headers): Add y letter in readelf section output key mapping for ARM architecture.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c12
2 files changed, 5 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ed99d92880..739393d1e9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-20 Mickael Guene <mickael.guene@st.com>
+
+ * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
+ section using '.text.noread' pattern.
+
2016-01-19 John Baldwin <jhb@FreeBSD.org>
* elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 1c52526b61..39b6153359 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -17839,16 +17839,6 @@ elf32_arm_get_synthetic_symtab (bfd *abfd,
return n;
}
-static const struct bfd_elf_special_section
-elf32_arm_special_sections[] =
-{
-/* Catch sections with .text.noread prefix and apply allocate, execute and
- noread section attributes. */
- { STRING_COMMA_LEN (".text.noread"), -2, SHT_PROGBITS,
- SHF_ALLOC + SHF_EXECINSTR + SHF_ARM_NOREAD },
- { NULL, 0, 0, 0, 0 }
-};
-
static bfd_boolean
elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr * hdr)
{
@@ -17953,8 +17943,6 @@ elf32_arm_count_additional_relocs (asection *sec)
#define elf_backend_obj_attrs_order elf32_arm_obj_attrs_order
#define elf_backend_obj_attrs_handle_unknown elf32_arm_obj_attrs_handle_unknown
-#undef elf_backend_special_sections
-#define elf_backend_special_sections elf32_arm_special_sections
#undef elf_backend_section_flags
#define elf_backend_section_flags elf32_arm_section_flags
#undef elf_backend_lookup_section_flags_hook