]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/pa/som.h
Update Copyright years for files modified in 2010.
[thirdparty/gcc.git] / gcc / config / pa / som.h
index 109e2a1647645b55ebd0a6b1895e5230ceb8a7cd..73095e5e04143fc15402b7b12f89d9103ff76e16 100644 (file)
@@ -1,12 +1,12 @@
 /* Definitions for SOM assembler support.
-   Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
-   Inc.
+   Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 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)
+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,
@@ -15,9 +15,8 @@ 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 GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 /* So we can conditionalize small amounts of code in pa.c or pa.md.  */
 #undef TARGET_SOM
@@ -34,15 +33,6 @@ Boston, MA 02110-1301, USA.  */
 
 #define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
 
-/* Select a format to encode pointers in exception handling data.  CODE
-   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
-   true if the symbol may be affected by dynamic relocations.  Because
-   the HP assembler does auto alignment, it is necessary to use
-   DW_EH_PE_aligned instead of the default DW_EH_PE_absptr.  */
-
-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
-  (TARGET_GAS ? DW_EH_PE_absptr : DW_EH_PE_aligned)
-
 /* HPUX has a program 'chatr' to list the dependencies of dynamically
    linked executables and shared libraries.  */
 #define LDD_SUFFIX "chatr"
@@ -128,7 +118,7 @@ do {                                                                \
                 fputs (",PRIV_LEV=3", FILE);                           \
               }                                                        \
             for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4;   \
-                 parm = TREE_CHAIN (parm))                             \
+                 parm = DECL_CHAIN (parm))                             \
               {                                                        \
                 if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode         \
                     && ! TARGET_SOFT_FLOAT)                            \
@@ -167,9 +157,7 @@ do {                                                                \
                   }                                                    \
               }                                                        \
             /* anonymous args */                                       \
-            if (TYPE_ARG_TYPES (tree_type) != 0                        \
-                && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\
-                    != void_type_node))                                \
+            if (stdarg_p (tree_type))                                  \
               {                                                        \
                 for (; i < 4; i++)                                     \
                   fprintf (FILE, ",ARGW%d=GR", i);                     \
@@ -184,9 +172,7 @@ do {                                                                \
           }} while (0)
 
 #define TARGET_ASM_FILE_START pa_som_file_start
-
-/* String to output before text.  */
-#define TEXT_SECTION_ASM_OP som_text_section_asm_op ()
+#define TARGET_ASM_INIT_SECTIONS pa_som_asm_init_sections
 
 /* String to output before writable data.  */
 #define DATA_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $DATA$\n"
@@ -194,28 +180,6 @@ do {                                                               \
 /* String to output before uninitialized data.  */
 #define BSS_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $BSS$\n"
 
-/* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups
-   which reference data within the $TEXT$ space (for example constant
-   strings in the $LIT$ subspace).
-
-   The assemblers (GAS and HP as) both have problems with handling
-   the difference of two symbols which is the other correct way to
-   reference constant data during PIC code generation.
-
-   So, there's no way to reference constant data which is in the
-   $TEXT$ space during PIC generation.  Instead place all constant
-   data into the $PRIVATE$ subspace (this reduces sharing, but it
-   works correctly).  */
-#define READONLY_DATA_SECTION \
-  (flag_pic ? data_section : som_readonly_data_section)
-
-/* We must not have a reference to an external symbol defined in a
-   shared library in a readonly section, else the SOM linker will
-   complain.
-
-   So, we force exception information into the data section.  */
-#define TARGET_ASM_EXCEPTION_SECTION data_section
-
 /* This is how to output a command to make the user-level label
    named NAME defined for reference from other files.  We use
    assemble_name_raw instead of assemble_name since a symbol in
@@ -308,11 +272,13 @@ do {                                              \
 #define ALWAYS_STRIP_DOTDOT 1
 
 /* If GAS supports weak, we can support weak when we have working linker
-   support for secondary definitions and are generating code for GAS.  */
+   support for secondary definitions and are generating code for GAS.
+   This is primarily for one-only support as SOM doesn't allow undefined
+   weak symbols.  */
 #ifdef HAVE_GAS_WEAK
-#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
+#define TARGET_SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
 #else
-#define SUPPORTS_WEAK 0
+#define TARGET_SUPPORTS_WEAK 0
 #endif
 
 /* CVS GAS as of 4/28/04 supports a comdat parameter for the .nsubspa
@@ -325,7 +291,7 @@ do {                                                \
 #endif
 
 /* We can support one only if we support weak or comdat.  */
-#define SUPPORTS_ONE_ONLY (SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT)
+#define SUPPORTS_ONE_ONLY (TARGET_SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT)
 
 /* We use DECL_COMMON for uninitialized one-only variables as we don't
    have linkonce .bss.  We use SOM secondary definitions or comdat for
@@ -336,7 +302,7 @@ do {                                                \
         && (DECL_INITIAL (DECL) == 0                                   \
             || DECL_INITIAL (DECL) == error_mark_node))                        \
       DECL_COMMON (DECL) = 1;                                          \
-    else if (SUPPORTS_WEAK)                                            \
+    else if (TARGET_SUPPORTS_WEAK)                                     \
       DECL_WEAK (DECL) = 1;                                            \
   } while (0)
 
@@ -369,3 +335,7 @@ do {                                                \
 /* We can't handle weak aliases, and therefore can't support pragma weak.
    Suppress the use of pragma weak in gthr-dce.h and gthr-posix.h.  */
 #define GTHREAD_USE_WEAK 0
+
+/* Shared library suffix.  Collect2 strips the version string after
+   this suffix when generating constructor/destructor names.  */ 
+#define SHLIB_SUFFIX ".sl"