aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2016-08-04 15:36:52 +0100
committerThomas Preud'homme <thomas.preudhomme@arm.com>2016-08-04 15:36:52 +0100
commit4ba2ef8fbe74716708e5ce0bcba4f3b1cc8ac99a (patch)
tree1765b4f578102d53c5f142e9bd6473f129327385 /include
parent024425668d120663a73913352df701c8f0aea316 (diff)
downloadgdb-4ba2ef8fbe74716708e5ce0bcba4f3b1cc8ac99a.zip
gdb-4ba2ef8fbe74716708e5ce0bcba4f3b1cc8ac99a.tar.gz
gdb-4ba2ef8fbe74716708e5ce0bcba4f3b1cc8ac99a.tar.bz2
2016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
bfd/ * elf32-arm.c (CMSE_PREFIX): Define macro. (elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence. (cmse_branch_thumb_only): Declare stub. (struct elf32_arm_link_hash_table): Define cmse_stub_sec field. (elf32_arm_get_plt_info): Add globals parameter. Use it to return FALSE if there is no PLT. (arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_gc_sweep_hook): Likewise. (elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M secure entry functions. (arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required): Change to a switch case and add a case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_stub_dedicated_output_section_name): Likewise. (arm_stub_dedicated_input_section_ptr): Likewise and remove ATTRIBUTE_UNUSED for htab parameter. (arm_stub_required_alignment): Likewise. (arm_stub_sym_claimed): Likewise. (arm_dedicated_stub_section_padding): Likewise. (cmse_scan): New function. (elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets. Set stub_changed to TRUE if such veneers were created. (elf32_arm_swap_symbol_in): Add detection code for CMSE special symbols. include/ * arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro. (ARM_SET_SYM_CMSE_SPCL): Likewise. ld/ * ld.texinfo (Placement of SG veneers): New concept entry. * testsuite/ld-arm/arm-elf.exp (Secure gateway veneers: no .gnu.sgstubs section): New test. (Secure gateway veneers: wrong entry functions): Likewise. (Secure gateway veneers (ARMv8-M Baseline)): Likewise. (Secure gateway veneers (ARMv8-M Mainline)): Likewise. * testsuite/ld-arm/cmse-veneers.s: New file. * testsuite/ld-arm/cmse-veneers.d: Likewise. * testsuite/ld-arm/cmse-veneers.rd: Likewise. * testsuite/ld-arm/cmse-veneers.sd: Likewise. * testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out: Likewise. * testsuite/ld-arm/cmse-veneers-wrong-entryfct.out: Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/elf/arm.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index f48ed0a..4d51d0b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro.
+ (ARM_SET_SYM_CMSE_SPCL): Likewise.
+
2016-08-01 Andrew Jenner <andrew@codesourcery.com>
* opcode/ppc.h (PPC_OPCODE_E200Z4): New define.
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 27ce6b8..87a6e58 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -384,4 +384,11 @@ enum arm_st_branch_type {
| ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
#endif
+/* Get or set whether a symbol is a special symbol of an entry function of CMSE
+ secure code. */
+#define ARM_GET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
+ (((SYM_TARGET_INTERNAL) >> 2) & 1)
+#define ARM_SET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \
+ (SYM_TARGET_INTERNAL) |= 4
+
#endif /* _ELF_ARM_H */