summaryrefslogtreecommitdiff
path: root/gcc/config/ia64
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-01-11 04:07:28 +0000
committerAlan Modra <amodra@gcc.gnu.org>2005-01-11 14:37:28 +1030
commitabb8b19a1ff526e0073beaa9d6def3bad6ec8019 (patch)
tree869b1a7d59b733f1fbeef831b6fe4ca534026d7a /gcc/config/ia64
parentb1eae416343b059b5be8adb2c8ff4aac8ebec7c4 (diff)
downloadgcc-abb8b19a1ff526e0073beaa9d6def3bad6ec8019.tar.gz
varasm.c (default_section_type_flags_1): Don't set SECTION_SMALL.
* 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. From-SVN: r93175
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r--gcc/config/ia64/hpux.h5
-rw-r--r--gcc/config/ia64/ia64.c32
2 files changed, 27 insertions, 10 deletions
diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h
index cd65be5d688..9ae420f84fc 100644
--- a/gcc/config/ia64/hpux.h
+++ b/gcc/config/ia64/hpux.h
@@ -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
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 5e8c5cd9970..11f47511947 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -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