From 92d8940891b3cbf1648b0fd4606cc12163162594 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 31 Jan 1995 18:54:47 +0000 Subject: [PATCH] (ASM_DECLARE_FUNCTION_NAME): Ensure section is .text if no section attribute. From-SVN: r8842 --- gcc/config/mips/mips.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); \ -- 2.30.2