OSDN Git Service

* varasm.c (default_section_type_flags_1): Don't set SECTION_SMALL.
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2005 04:07:28 +0000 (04:07 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2005 04:07:28 +0000 (04:07 +0000)
* config/ia64/ia64.c (TARGET_SECTION_TYPE_FLAGS): Define.
(TARGET_RWRELOC): Define.
(ia64_rwreloc_section_type_flags): Delete.
(ia64_section_type_flags): New function.
* config/ia64/hpux.h (TARGET_SECTION_TYPE_FLAGS): Don't define.
(TARGET_RWRELOC): Define.

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

gcc/ChangeLog
gcc/config/ia64/hpux.h
gcc/config/ia64/ia64.c
gcc/varasm.c

index 1db3edd..205c7b8 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * varasm.c (default_section_type_flags_1): Don't set SECTION_SMALL.
+       * config/ia64/ia64.c (TARGET_SECTION_TYPE_FLAGS): Define.
+       (TARGET_RWRELOC): Define.
+       (ia64_rwreloc_section_type_flags): Delete.
+       (ia64_section_type_flags): New function.
+       * config/ia64/hpux.h (TARGET_SECTION_TYPE_FLAGS): Don't define.
+       (TARGET_RWRELOC): Define.
+
 2005-01-10  David Mosberger  <davidm@hpl.hp.com>
 
        PR target/18987
index cd65be5..9ae420f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine GNU compiler.  IA-64 version.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Steve Ellcey <sje@cup.hp.com> and
                   Reva Cuthbertson <reva@cup.hp.com>
@@ -193,8 +193,7 @@ do {                                                                \
 #define TARGET_ASM_UNIQUE_SECTION  ia64_rwreloc_unique_section
 #undef  TARGET_ASM_SELECT_RTX_SECTION
 #define TARGET_ASM_SELECT_RTX_SECTION  ia64_rwreloc_select_rtx_section
-#undef  TARGET_SECTION_TYPE_FLAGS
-#define TARGET_SECTION_TYPE_FLAGS  ia64_rwreloc_section_type_flags
+#define TARGET_RWRELOC  true
 
 /* ia64 HPUX has the float and long double forms of math functions.  */
 #undef TARGET_C99_FUNCTIONS
index 5e8c5cd..11f4751 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by James E. Wilson <wilson@cygnus.com> and
                  David Mosberger <davidm@hpl.hp.com>.
@@ -258,9 +258,7 @@ static void ia64_rwreloc_unique_section (tree, int)
 static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx,
                                             unsigned HOST_WIDE_INT)
      ATTRIBUTE_UNUSED;
-static unsigned int ia64_rwreloc_section_type_flags (tree, const char *, int)
-     ATTRIBUTE_UNUSED;
-
+static unsigned int ia64_section_type_flags (tree, const char *, int);
 static void ia64_hpux_add_extern_decl (tree decl)
      ATTRIBUTE_UNUSED;
 static void ia64_hpux_file_end (void)
@@ -387,6 +385,9 @@ static const struct attribute_spec ia64_attribute_table[] =
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO ia64_encode_section_info
 
+#undef  TARGET_SECTION_TYPE_FLAGS
+#define TARGET_SECTION_TYPE_FLAGS  ia64_section_type_flags
+
 /* ??? ABI doesn't allow us to define this.  */
 #if 0
 #undef TARGET_PROMOTE_FUNCTION_ARGS
@@ -8796,10 +8797,27 @@ ia64_rwreloc_select_rtx_section (enum machine_mode mode, rtx x,
   flag_pic = save_pic;
 }
 
+#ifndef TARGET_RWRELOC
+#define TARGET_RWRELOC flag_pic
+#endif
+
 static unsigned int
-ia64_rwreloc_section_type_flags (tree decl, const char *name, int reloc)
-{
-  return default_section_type_flags_1 (decl, name, reloc, true);
+ia64_section_type_flags (tree decl, const char *name, int reloc)
+{
+  unsigned int flags = 0;
+
+  if (strcmp (name, ".sdata") == 0
+      || strncmp (name, ".sdata.", 7) == 0
+      || strncmp (name, ".gnu.linkonce.s.", 16) == 0
+      || strncmp (name, ".sdata2.", 8) == 0
+      || strncmp (name, ".gnu.linkonce.s2.", 17) == 0
+      || strcmp (name, ".sbss") == 0
+      || strncmp (name, ".sbss.", 6) == 0
+      || strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
+    flags = SECTION_SMALL;
+
+  flags |= default_section_type_flags_1 (decl, name, reloc, TARGET_RWRELOC);
+  return flags;
 }
 
 /* Returns true if FNTYPE (a FUNCTION_TYPE or a METHOD_TYPE) returns a
index 086e9cc..ba0aab5 100644 (file)
@@ -1,6 +1,7 @@
 /* Output variables, constants and external declarations, for GNU compiler.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -4606,20 +4607,11 @@ default_section_type_flags_1 (tree decl, const char *name, int reloc,
 
   if (strcmp (name, ".bss") == 0
       || strncmp (name, ".bss.", 5) == 0
-      || strncmp (name, ".gnu.linkonce.b.", 16) == 0)
-    flags |= SECTION_BSS;
-
-  if (strcmp (name, ".sdata") == 0
-      || strncmp (name, ".sdata.", 7) == 0
-      || strncmp (name, ".gnu.linkonce.s.", 16) == 0
-      || strncmp (name, ".sdata2.", 8) == 0
-      || strncmp (name, ".gnu.linkonce.s2.", 17) == 0)
-    flags |= SECTION_SMALL;
-
-  if (strcmp (name, ".sbss") == 0
+      || strncmp (name, ".gnu.linkonce.b.", 16) == 0
+      || strcmp (name, ".sbss") == 0
       || strncmp (name, ".sbss.", 6) == 0
       || strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
-    flags |= SECTION_SMALL | SECTION_BSS;
+    flags |= SECTION_BSS;
 
   if (strcmp (name, ".tdata") == 0
       || strncmp (name, ".tdata.", 7) == 0