OSDN Git Service

(ASM_DECLARE_FUNCTION_NAME): Ensure section is .text if no section attribute.
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jan 1995 18:54:47 +0000 (18:54 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jan 1995 18:54:47 +0000 (18:54 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8842 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/mips/mips.h

index 25e6f09..8034955 100644 (file)
@@ -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);                                             \