config.gcc (arm*-wince-pe*, [...]): Add arm/pe.opt to $extra_options.
[gcc.git] / gcc / config / arm / elf.h
index 0ad23f8f5d03c6c982573874a75969054cd6303a..56f8422ee503629eb0b0f41ae3f84db2e39ba9b8 100644 (file)
@@ -1,26 +1,26 @@
 /* Definitions of target machine for GNU compiler.
    For ARM with ELF obj format.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004
    Free Software Foundation, Inc.
    Contributed by Philip Blundell <philb@gnu.org> and
    Catherine Moore <clm@cygnus.com>
    
-This file is part of GNU CC.
+   This file is part of GCC.
 
-GNU CC 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 option)
-any later version.
+   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
+   option) any later version.
 
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   GCC is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
 
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+   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.  */
 
 #ifndef OBJECT_FORMAT_ELF
  #error elf.h included before elfos.h
@@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA.  */
 
 #ifndef SUBTARGET_ASM_FLOAT_SPEC
 #define SUBTARGET_ASM_FLOAT_SPEC "\
-%{mapcs-float:-mfloat} %{msoft-float:-mno-fpu}"
+%{mapcs-float:-mfloat}"
 #endif
 
 #ifndef ASM_SPEC
@@ -58,6 +58,8 @@ Boston, MA 02111-1307, USA.  */
 %{mapcs-*:-mapcs-%*} \
 %(subtarget_asm_float_spec) \
 %{mthumb-interwork:-mthumb-interwork} \
+%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
+%{mfloat-abi=*} %{mfpu=*} \
 %(subtarget_extra_asm_spec)"
 #endif
 
@@ -106,61 +108,21 @@ Boston, MA 02111-1307, USA.  */
 #endif
 
 #ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME)
+#define TARGET_DEFAULT (MASK_APCS_FRAME)
 #endif
 
 #ifndef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-  { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" }
 #endif
 \f
-
-/* This outputs a lot of .req's to define alias for various registers.
-   Let's try to avoid this.  */
-#ifndef ASM_FILE_START
-#define ASM_FILE_START(STREAM)                                 \
-  do                                                           \
-    {                                                          \
-      fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
-              ASM_COMMENT_START, version_string);              \
-      output_file_directive (STREAM, main_input_filename);     \
-      fprintf (STREAM, ASM_APP_OFF);                           \
-    }                                                          \
-  while (0)
-#endif
-
-/* Output an internal label definition.  */
-#undef  ASM_OUTPUT_INTERNAL_LABEL
-#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)         \
-  do                                                           \
-    {                                                          \
-      char * s = (char *) alloca (40 + strlen (PREFIX));       \
-      extern int arm_target_label, arm_ccfsm_state;            \
-      extern rtx arm_target_insn;                              \
-                                                               \
-      if (arm_ccfsm_state == 3 && arm_target_label == (NUM)    \
-         && !strcmp (PREFIX, "L"))                             \
-       {                                                       \
-         arm_ccfsm_state = 0;                                  \
-         arm_target_insn = NULL;                               \
-       }                                                       \
-      ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM));                \
-      ASM_OUTPUT_LABEL (STREAM, s);                            \
-    }                                                          \
-  while (0)
+#define TARGET_ASM_FILE_START_APP_OFF true
+#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
 \f
-#undef  TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION  arm_elf_asm_named_section
-\f
-#undef  ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(STREAM, NAME, SIZE, ALIGN)   \
-  do                                                           \
-    {                                                          \
-      fprintf (STREAM, "\t.comm\t");                           \
-      assemble_name (STREAM, NAME);                            \
-      fprintf (STREAM, ", %d, %d\n", SIZE, ALIGN);             \
-    }                                                          \
-  while (0)
+
+/* Output an element in the static constructor array.  */
+#undef TARGET_ASM_CONSTRUCTOR
+#define TARGET_ASM_CONSTRUCTOR arm_elf_asm_constructor
 
 /* For PIC code we need to explicitly specify (PLT) and (GOT) relocs.  */
 #define NEED_PLT_RELOC flag_pic
@@ -185,4 +147,5 @@ Boston, MA 02111-1307, USA.  */
     }                                                  \
   while (0)
 
-#define SUPPORTS_INIT_PRIORITY 1
+/* The EABI doesn't provide a way of implementing init_priority.  */
+#define SUPPORTS_INIT_PRIORITY (!TARGET_AAPCS_BASED)