From: Doug Evans Date: Tue, 31 Jan 1995 18:54:47 +0000 (+0000) Subject: (ASM_DECLARE_FUNCTION_NAME): Ensure section is .text if no section attribute. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92d8940891b3cbf1648b0fd4606cc12163162594;p=gcc.git (ASM_DECLARE_FUNCTION_NAME): Ensure section is .text if no section attribute. From-SVN: r8842 --- diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 25e6f09bbd8..8034955d135 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3363,7 +3363,17 @@ while (0) { \ extern FILE *asm_out_text_file; \ if (TARGET_GP_OPT) \ - STREAM = asm_out_text_file; \ + { \ + STREAM = asm_out_text_file; \ + /* ??? text_section gets called too soon. If the previous \ + function is in a special section and we're not, we have \ + to switch back to the text section. We can't call \ + text_section again as gcc thinks we're already there. */ \ + /* ??? See varasm.c. There are other things that get output \ + too early, like alignment (before we've switched STREAM). */ \ + if (DECL_SECTION_NAME (DECL) == NULL_TREE) \ + fprintf (STREAM, "%s\n", TEXT_SECTION_ASM_OP); \ + } \ \ current_function_name = NAME; \ HALF_PIC_DECLARE (NAME); \