+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
/* 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>
#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
/* 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>.
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)
#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
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
/* 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.
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