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.
This commit is contained in:
parent
be56871ee8
commit
91f68a68f9
18 changed files with 163 additions and 18 deletions
|
@ -5430,6 +5430,9 @@ get_elf_section_flags (bfd_vma sh_flags)
|
|||
|| elf_header.e_machine == EM_K1OM)
|
||||
&& flag == SHF_X86_64_LARGE)
|
||||
*p = 'l';
|
||||
else if (elf_header.e_machine == EM_ARM
|
||||
&& flag == SHF_ARM_NOREAD)
|
||||
*p = 'y';
|
||||
else if (flag & SHF_MASKOS)
|
||||
{
|
||||
*p = 'o';
|
||||
|
@ -6006,6 +6009,11 @@ process_section_headers (FILE * file)
|
|||
printf (_("Key to Flags:\n\
|
||||
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)\n\
|
||||
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
|
||||
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
|
||||
else if (elf_header.e_machine == EM_ARM)
|
||||
printf (_("Key to Flags:\n\
|
||||
W (write), A (alloc), X (execute), M (merge), S (strings), y (noread)\n\
|
||||
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
|
||||
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
|
||||
else
|
||||
printf (_("Key to Flags:\n\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue