aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorMickael Guene <mickael.guene@st.com>2015-12-22 14:12:35 +0000
committerNick Clifton <nickc@redhat.com>2015-12-22 14:12:35 +0000
commitac4c9b0459fe89f2b84bf8b18a3bf86bf569b7d1 (patch)
treecc76d51d940c65bd0986f73e55a447f12b65652d /binutils
parent6d265cb4a956310d2cae231ac63a37e11fe376e1 (diff)
downloadgdb-ac4c9b0459fe89f2b84bf8b18a3bf86bf569b7d1.zip
gdb-ac4c9b0459fe89f2b84bf8b18a3bf86bf569b7d1.tar.gz
gdb-ac4c9b0459fe89f2b84bf8b18a3bf86bf569b7d1.tar.bz2
Add support for ARM's NOREAD section flag.
include/elf * arm.h: Add arm SHF_ARM_NOREAD section flag. bfd * bfd-in2.h: Regenerate. * section.c: Add SEC_ELF_NOREAD. * elf32-arm.c (elf32_arm_post_process_headers): Only set PF_X attribute if a segment only contains section with SHF_ARM_NOREAD flag. (elf32_arm_fake_sections): Add SEC_ELF_NOREAD conversion. (elf32_arm_section_flags): New function to convert SHF_ARM_NOREAD to bfd flag. (elf32_arm_lookup_section_flags): New function to allow INPUT_SECTION_FLAGS directive with SHF_ARM_NOREAD flag. (elf32_arm_special_sections): Add special sections array to catch section prefix by '.text.noread' pattern. ld/testsuite * ld-arm/arm-elf.exp: New tests. * ld-arm/thumb1-input-section-flag-match.d: New * ld-arm/thumb1-input-section-flag-match.s: New * ld-arm/thumb1-noread-not-present-mixing-two-section.d: New * ld-arm/thumb1-noread-not-present-mixing-two-section.s: New * ld-arm/thumb1-noread-present-one-section.d: New * ld-arm/thumb1-noread-present-one-section.s: New * ld-arm/thumb1-noread-present-two-section.d: New * ld-arm/thumb1-noread-present-two-section.s: New binutils * readelf.c (get_elf_section_flags): Add support for ARM specific section flags.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c17
2 files changed, 21 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f588410..fce5f89 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-22 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_elf_section_flags): Add support for ARM specific
+ section flags.
+
2015-12-17 Maciej W. Rozycki <macro@imgtec.com>
* MAINTAINERS: Add myself as MIPS maintainer.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c21ce3f..a31db52 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5273,7 +5273,11 @@ get_elf_section_flags (bfd_vma sh_flags)
/* 18 */ { STRING_COMMA_LEN ("EXCLUDE") },
/* SPARC specific. */
/* 19 */ { STRING_COMMA_LEN ("ORDERED") },
- /* 20 */ { STRING_COMMA_LEN ("COMPRESSED") }
+ /* 20 */ { STRING_COMMA_LEN ("COMPRESSED") },
+ /* ARM specific. */
+ /* 21 */ { STRING_COMMA_LEN ("ENTRYSECT") },
+ /* 22 */ { STRING_COMMA_LEN ("ARM_NOREAD") },
+ /* 23 */ { STRING_COMMA_LEN ("COMDEF") }
};
if (do_section_details)
@@ -5343,6 +5347,17 @@ get_elf_section_flags (bfd_vma sh_flags)
if (flag == SHF_ORDERED)
sindex = 19;
break;
+
+ case EM_ARM:
+ switch (flag)
+ {
+ case SHF_ENTRYSECT: sindex = 21; break;
+ case SHF_ARM_NOREAD: sindex = 22; break;
+ case SHF_COMDEF: sindex = 23; break;
+ default: break;
+ }
+ break;
+
default:
break;
}