+2002-05-13 Andreas Schwab <schwab@suse.de>
+
+ * varasm.c (resolve_unique_section): Add third parameter
+ flag_function_or_data_sections and use it instead of
+ flag_function_sections.
+ (assemble_start_function): Pass flag_function_sections.
+ (asm_emit_uninitialised): Pass flag_data_sections.
+ (assemble_variable): Likewise.
+
2002-05-14 Richard Henderson <rth@redhat.com>
* config/i386/i386.md: Use define_constants for unspec numbers.
static int const_str_htab_eq PARAMS ((const void *x, const void *y));
static void const_str_htab_del PARAMS ((void *));
static void asm_emit_uninitialised PARAMS ((tree, const char*, int, int));
-static void resolve_unique_section PARAMS ((tree, int));
+static void resolve_unique_section PARAMS ((tree, int, int));
static void mark_weak PARAMS ((tree));
\f
static enum in_section { no_section, in_text, in_data, in_named
/* If required, set DECL_SECTION_NAME to a unique name. */
static void
-resolve_unique_section (decl, reloc)
+resolve_unique_section (decl, reloc, flag_function_or_data_sections)
tree decl;
int reloc ATTRIBUTE_UNUSED;
+ int flag_function_or_data_sections;
{
if (DECL_SECTION_NAME (decl) == NULL_TREE
- && (flag_function_sections
+ && (flag_function_or_data_sections
|| (targetm.have_named_sections
&& DECL_ONE_ONLY (decl))))
UNIQUE_SECTION (decl, reloc);
if (CONSTANT_POOL_BEFORE_FUNCTION)
output_constant_pool (fnname, decl);
- resolve_unique_section (decl, 0);
+ resolve_unique_section (decl, 0, flag_function_sections);
function_section (decl);
/* Tell assembler to move to target machine's alignment for functions. */
if (destination == asm_dest_bss)
globalize_decl (decl);
- resolve_unique_section (decl, 0);
+ resolve_unique_section (decl, 0, flag_data_sections);
if (flag_shared_data)
{
reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0;
else if (DECL_INITIAL (decl))
reloc = output_addressed_constants (DECL_INITIAL (decl));
- resolve_unique_section (decl, reloc);
+ resolve_unique_section (decl, reloc, flag_data_section);
/* Handle uninitialized definitions. */