From 0ee70cc0000fe25484cb0d3b2ac2904d2007e5cf Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Thu, 22 Sep 2016 17:02:47 +0000 Subject: [ARM] Add support for -mpure-code option gcc/ChangeLog: 2016-09-22 Andre Vieira Terry Guo * target.def (elf_flags_numeric): New target hook. * targhooks.h (default_asm_elf_flags_numeric): New. * varasm.c (default_asm_elf_flags_numeric): New. (default_elf_asm_named_section): Use new target hook. * config/arm/arm.opt (mpure-code): New. * config/arm/arm.h (SECTION_ARM_PURECODE): New. * config/arm/arm.c (arm_asm_init_sections): Add section attribute to default text section if -mpure-code. (arm_option_check_internal): Diagnose use of option with non supported targets and/or options. (arm_asm_elf_flags_numeric): New. (arm_function_section): New. (arm_elf_section_type_flags): New. * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Disable for -mpure-code. * gcc/doc/texi (TARGET_ASM_ELF_FLAGS_NUMERIC): New. * gcc/doc/texi.in (TARGET_ASM_ELF_FLAGS_NUMERIC): Likewise. gcc/testsuite/ChangeLog: 2016-09-22 Andre Vieira Terry Guo * gcc.target/arm/pure-code/ffunction-sections.c: New. * gcc.target/arm/pure-code/no-literal-pool.c: New. * gcc.target/arm/pure-code/pure-code.exp: New. Co-Authored-By: Terry Guo From-SVN: r240379 --- gcc/doc/tm.texi.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/doc/tm.texi.in') diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index fd3d65d..f1cfc86 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -5219,6 +5219,8 @@ of the filename using this macro. @hook TARGET_ASM_NAMED_SECTION +@hook TARGET_ASM_ELF_FLAGS_NUMERIC + @hook TARGET_ASM_FUNCTION_SECTION @hook TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS -- cgit v1.1