From ac4c9b0459fe89f2b84bf8b18a3bf86bf569b7d1 Mon Sep 17 00:00:00 2001 From: Mickael Guene Date: Tue, 22 Dec 2015 14:12:35 +0000 Subject: 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. --- include/ChangeLog | 4 ---- include/elf/ChangeLog | 8 ++++++++ include/elf/arm.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 4dcfe10..cd33a61 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,7 +1,3 @@ -2015-12-16 Mickael Guene - - * elf/arm.h: Add new arm relocations. - 2015-12-01 Alan Modra * bout.h: Invoke aout N_* macros with pointer to diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 5b98c66..93b00016 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,11 @@ +2015-12-22 Mickael Guene + + * arm.h: Add arm SHF_ARM_NOREAD section flag. + +2015-12-16 Mickael Guene + + * arm.h: Add new arm relocations. + 2015-12-14 Yoshinori Sato * rx.h (E_FLAG_RX_V2): New RXv2 type. diff --git a/include/elf/arm.h b/include/elf/arm.h index 5691118..4f09b6a 100644 --- a/include/elf/arm.h +++ b/include/elf/arm.h @@ -82,6 +82,7 @@ /* ARM-specific values for sh_flags. */ #define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_ARM_NOREAD 0x20000000 /* Section contains code that can be place on no read memory area. */ #define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ /* ARM-specific program header flags. */ -- cgit v1.1