OSDN Git Service

* config/alpha/freebsd.h (LINK_SPEC): Don't use
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / pe.h
index afaade2..009c4fe 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for ARM with PE obj format.
-   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004
+   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2007
    Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
    
@@ -7,7 +7,7 @@
 
    GCC is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 2, or (at your
+   by the Free Software Foundation; either version 3, or (at your
    option) any later version.
 
    GCC is distributed in the hope that it will be useful, but WITHOUT
@@ -16,9 +16,8 @@
    License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GCC; see the file COPYING.  If not, write to
-   the Free Software Foundation, 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with GCC; see the file COPYING3.  If not see
+   <http://www.gnu.org/licenses/>.  */
 
 /* Enable PE specific code.  */
 #define ARM_PE         1
 #undef  SUBTARGET_CPP_SPEC
 #define SUBTARGET_CPP_SPEC "-D__pe__"
 
-
-/* Experimental addition for pr 7885.
-   Ignore dllimport for functions.  */
-#define TARGET_FLAG_NOP_FUN    (1 << 24)
-
-#undef  TARGET_NOP_FUN_DLLIMPORT
-#define TARGET_NOP_FUN_DLLIMPORT (target_flags & TARGET_FLAG_NOP_FUN)
-
-#undef  SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES                                     \
-{ "nop-fun-dllimport",           TARGET_FLAG_NOP_FUN,          \
-  N_("Ignore dllimport attribute for functions") },            \
-{ "no-nop-fun-dllimport",      - TARGET_FLAG_NOP_FUN, "" },
-
 #undef  TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
+#define TARGET_DEFAULT (MASK_NOP_FUN_DLLIMPORT)
 
 #undef  MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
          drectve_section ();                                   \
          fprintf (STREAM, "\t.ascii \" -export:%s\"\n",        \
                   arm_strip_name_encoding (NAME));             \
-         function_section (DECL);                              \
+         switch_to_section (function_section (DECL));          \
        }                                                       \
       ARM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL);          \
       if (TARGET_THUMB)                                                \
     {                                                  \
       if (arm_dllexport_name_p (NAME))                 \
        {                                               \
-         enum in_section save_section = in_section;    \
+         section *save_section = in_section;           \
          drectve_section ();                           \
          fprintf (STREAM, "\t.ascii \" -export:%s\"\n",\
                   arm_strip_name_encoding (NAME));     \
-         switch_to_section (save_section, (DECL));     \
+         switch_to_section (save_section);             \
        }                                               \
       ASM_OUTPUT_LABEL ((STREAM), (NAME));             \
     }                                                  \
 
 #define DRECTVE_SECTION_ASM_OP "\t.section .drectve"
 
-/* A list of other sections which the compiler might be "in" at any
-   given time.  */
-
-#undef  EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_drectve
-
-/* A list of extra section function definitions.  */
-
-#undef  EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS \
-  DRECTVE_SECTION_FUNCTION     \
-  SWITCH_TO_SECTION_FUNCTION
-
-#define DRECTVE_SECTION_FUNCTION \
-void                                                                   \
-drectve_section (void)                                                 \
-{                                                                      \
-  if (in_section != in_drectve)                                                \
-    {                                                                  \
-      fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP);          \
-      in_section = in_drectve;                                         \
-    }                                                                  \
-}
-
-/* Switch to SECTION (an `enum in_section').
-
-   ??? This facility should be provided by GCC proper.
-   The problem is that we want to temporarily switch sections in
-   ASM_DECLARE_OBJECT_NAME and then switch back to the original section
-   afterwards.  */
-#define SWITCH_TO_SECTION_FUNCTION                             \
-static void                                                    \
-switch_to_section (enum in_section section, tree decl)         \
-{                                                              \
-  switch (section)                                             \
-    {                                                          \
-      case in_text: text_section (); break;                    \
-      case in_unlikely_executed_text: unlikely_text_section (); break; \
-      case in_data: data_section (); break;                    \
-      case in_named: named_section (decl, NULL, 0); break;     \
-      case in_readonly_data: readonly_data_section (); break;  \
-      case in_ctors: ctors_section (); break;                  \
-      case in_dtors: dtors_section (); break;                  \
-      case in_drectve: drectve_section (); break;              \
-      default: abort (); break;                                        \
-    }                                                          \
-}
-
+#define drectve_section() \
+  (fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP), \
+   in_section = NULL)