diff options
author | Andreas Schwab <schwab@suse.de> | 2002-05-14 08:35:59 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@gcc.gnu.org> | 2002-05-14 08:35:59 +0000 |
commit | 1b18fc2c4e03c5b9060bc72e702964e226919384 (patch) | |
tree | aa0f1380391acc40ac9eede85e33d97940e9396d | |
parent | 8ee41eaf1600541582f3649d8e52fc94358a4791 (diff) | |
download | gcc-1b18fc2c4e03c5b9060bc72e702964e226919384.zip gcc-1b18fc2c4e03c5b9060bc72e702964e226919384.tar.gz gcc-1b18fc2c4e03c5b9060bc72e702964e226919384.tar.bz2 |
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: r53449
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/varasm.c | 13 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4eb4fd..65cca91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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. diff --git a/gcc/varasm.c b/gcc/varasm.c index 1d9522e..cb19e4f 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -183,7 +183,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 @@ -459,12 +459,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); @@ -1183,7 +1184,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. */ @@ -1394,7 +1395,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) { @@ -1595,7 +1596,7 @@ assemble_variable (decl, top_level, at_end, dont_output_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. */ |