+2002-09-04 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/elf.h (TARGET_SECTION_TYPE_FLAGS): Define to
+ xtensa_multibss_section_type_flags.
+ * config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Define.
+
2002-09-04 Richard Henderson <rth@redhat.com>
* doc/install-old.texi: Don't mention enquire.
static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned));
static struct machine_function * xtensa_init_machine_status PARAMS ((void));
static void printx PARAMS ((FILE *, signed int));
-static void xtensa_select_rtx_section PARAMS ((enum machine_mode, rtx,
- unsigned HOST_WIDE_INT));
+static unsigned int xtensa_multibss_section_type_flags
+ PARAMS ((tree, const char *, int));
+static void xtensa_select_rtx_section
+ PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
static void xtensa_encode_section_info PARAMS ((tree, int));
static rtx frame_size_const;
return 0;
}
+
+/* Some Xtensa targets support multiple bss sections. If the section
+ name ends with ".bss", add SECTION_BSS to the flags. */
+
+static unsigned int
+xtensa_multibss_section_type_flags (decl, name, reloc)
+ tree decl;
+ const char *name;
+ int reloc;
+{
+ unsigned int flags = default_section_type_flags (decl, name, reloc);
+ const char *suffix;
+
+ suffix = strrchr (name, '.');
+ if (suffix && strcmp (suffix, ".bss") == 0)
+ {
+ if (!decl || (TREE_CODE (decl) == VAR_DECL
+ && DECL_INITIAL (decl) == NULL_TREE))
+ flags |= SECTION_BSS; /* @nobits */
+ else
+ warning ("only uninitialized variables can be placed in a "
+ ".bss section");
+ }
+
+ return flags;
+}
+
+
/* The literal pool stays with the function. */
static void