OSDN Git Service

* config/sparc/sysv4.h (PUSHSECTION_FORMAT): Remove undef.
authorro@138bc75d-0d04-0410-961f-82ee72b054a4 <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Mar 2010 10:42:56 +0000 (10:42 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 00:40:25 +0000 (09:40 +0900)
(PUSHSECTION_ASM_OP): Remove.
(POPSECTION_ASM_OP): Remove.
(PUSHSECTION_FORMAT): Remove.
* config/sol2.h (PUSHSECTION_FORMAT): Define.
* config/sparc/sol2.h [!USE_GAS] (PUSHSECTION_FORMAT): Redefine.
* config/sol2.c (solaris_output_init_fini): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157861 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sol2.c
gcc/config/sol2.h

index 964204d..8d7b219 100644 (file)
@@ -1,3 +1,13 @@
+2010-03-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config/sparc/sysv4.h (PUSHSECTION_FORMAT): Remove undef.
+       (PUSHSECTION_ASM_OP): Remove.
+       (POPSECTION_ASM_OP): Remove.
+       (PUSHSECTION_FORMAT): Remove.
+       * config/sol2.h (PUSHSECTION_FORMAT): Define.
+       * config/sparc/sol2.h [!USE_GAS] (PUSHSECTION_FORMAT): Redefine.
+       * config/sol2.c (solaris_output_init_fini): Use it.
+
 2010-03-31  Jie Zhang  <jie@codesourcery.com>
 
        PR 43574
index 3531e79..32fa4f3 100644 (file)
@@ -105,14 +105,14 @@ solaris_output_init_fini (FILE *file, tree decl)
 {
   if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))
     {
-      fprintf (file, "\t.pushsection\t\".init\"\n");
+      fprintf (file, PUSHSECTION_FORMAT, ".init");
       ASM_OUTPUT_CALL (file, decl);
       fprintf (file, "\t.popsection\n");
     }
 
   if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))
     {
-      fprintf (file, "\t.pushsection\t\".fini\"\n");
+      fprintf (file, PUSHSECTION_FORMAT, ".fini");
       ASM_OUTPUT_CALL (file, decl);
       fprintf (file, "\t.popsection\n");
     }
index d77c0f8..8f24bc7 100644 (file)
@@ -254,6 +254,10 @@ __enable_execute_stack (void *addr)                                        \
   { "init",      0, 0, true,  false,  false, NULL },                   \
   { "fini",      0, 0, true,  false,  false, NULL }
 
+/* Solaris/x86 as and gas support the common ELF .section/.pushsection
+   syntax.  */
+#define PUSHSECTION_FORMAT     "\t.pushsection\t%s\n"
+
 /* This is how to declare the size of a function.  For Solaris, we output
    any .init or .fini entries here.  */
 #undef ASM_DECLARE_FUNCTION_SIZE