From df98f83be86d3e7413fba89ea8980cf1e59ce17f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 17 May 2002 10:43:43 +0000 Subject: [PATCH] varasm.c (resolve_unique_section): Add third parameter flag_function_or_data_sections and use it instead of... * 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. From-SVN: r53553 --- gcc/ChangeLog | 9 +++++++++ gcc/varasm.c | 13 +++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index afeb064da3e3..f3b87893957c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2002-05-17 Andreas Schwab + + * 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-15 Eric Botcazou * fold-const.c (fold) [LT_EXPR]: Move the transformation of a diff --git a/gcc/varasm.c b/gcc/varasm.c index 6dfc29211933..8213ffd82839 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -186,7 +186,7 @@ static hashval_t const_str_htab_hash PARAMS ((const void *x)); 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)); static enum in_section { no_section, in_text, in_data, in_named @@ -461,12 +461,13 @@ named_section (decl, name, reloc) /* 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); @@ -1188,7 +1189,7 @@ assemble_start_function (decl, fnname) 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. */ @@ -1397,7 +1398,7 @@ asm_emit_uninitialised (decl, name, size, rounded) 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) { @@ -1642,7 +1643,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data) reloc = output_addressed_constants (DECL_INITIAL (decl)); /* Switch to the appropriate section. */ - resolve_unique_section (decl, reloc); + resolve_unique_section (decl, reloc, flag_data_sections); variable_section (decl, reloc); /* dbxout.c needs to know this. */ -- 2.47.2