From 91f68a68f992e3f6c3da26c616b5257230bd1eec Mon Sep 17 00:00:00 2001 From: Mickael Guene Date: Wed, 20 Jan 2016 12:53:50 +0000 Subject: 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. --- binutils/doc/binutils.texi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'binutils/doc/binutils.texi') diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 771100e..b173732 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2125,6 +2125,11 @@ although @command{ld} relocates the sections correctly, using @samp{objdump Instead, it shows the usual addresses, which are implicit for the target. +Note, in some cases it is possible for a section to have both the +READONLY and the NOREAD attributes set. In such cases the NOREAD +attribute takes precedence, but @command{objdump} will report both +since the exact setting of the flag bits might be important. + @item -H @itemx --help Print a summary of the options to @command{objdump} and exit. -- cgit v1.1