From cf4403481dd67ecec1f1faabd8492421d3680a76 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 15 Apr 1996 01:46:10 -0600 Subject: flags.h (flag_function_sections): Declare. * flags.h (flag_function_sections): Declare. * toplev.c (flag_function_sections): Define. (compile_file): Add warnings when -ffunction-sections is used with -g, or profiling. Disable -ffunction-sections when profiling is used. Add warning when -ffunction-sections is used on a target that doesn't support it. * varasm.c (named_section): Make a copy of the section name in case the original is in temporary storage. (function_section): Set DECL_SECTION_NAME for each function if flag_function_sections is on and the target supports it. * dbxout.c (dbxout_function_end): New function. (dbxout_function): Call dbxout_function_end if using extensions and flag_function_sections is on. * sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): Prefix a function section's name with ".text%" when -ffunction-sections. From-SVN: r11774 --- gcc/config/sparc/sysv4.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/config/sparc/sysv4.h') diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index bc27b0c009a..1c69dd5ee17 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -185,7 +185,8 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \ #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ do { \ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ - fprintf (FILE, ".section\t\"%s\",#alloc,#execinstr\n", (NAME)); \ + fprintf (FILE, ".section\t\"%s%s\",#alloc,#execinstr\n", \ + flag_function_sections ? ".text%" : "", (NAME)); \ else if ((DECL) && TREE_READONLY (DECL)) \ fprintf (FILE, ".section\t\"%s\",#alloc\n", (NAME)); \ else \ -- cgit v1.2.1