Commit 1b18fc2c by Andreas Schwab Committed by Andreas Schwab

varasm.c (resolve_unique_section): Add third parameter…

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
parent 8ee41eaf
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> 2002-05-14 Richard Henderson <rth@redhat.com>
* config/i386/i386.md: Use define_constants for unspec numbers. * config/i386/i386.md: Use define_constants for unspec numbers.
......
...@@ -183,7 +183,7 @@ static hashval_t const_str_htab_hash PARAMS ((const void *x)); ...@@ -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 int const_str_htab_eq PARAMS ((const void *x, const void *y));
static void const_str_htab_del PARAMS ((void *)); static void const_str_htab_del PARAMS ((void *));
static void asm_emit_uninitialised PARAMS ((tree, const char*, int, int)); 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 void mark_weak PARAMS ((tree));
static enum in_section { no_section, in_text, in_data, in_named static enum in_section { no_section, in_text, in_data, in_named
...@@ -459,12 +459,13 @@ named_section (decl, name, reloc) ...@@ -459,12 +459,13 @@ named_section (decl, name, reloc)
/* If required, set DECL_SECTION_NAME to a unique name. */ /* If required, set DECL_SECTION_NAME to a unique name. */
static void static void
resolve_unique_section (decl, reloc) resolve_unique_section (decl, reloc, flag_function_or_data_sections)
tree decl; tree decl;
int reloc ATTRIBUTE_UNUSED; int reloc ATTRIBUTE_UNUSED;
int flag_function_or_data_sections;
{ {
if (DECL_SECTION_NAME (decl) == NULL_TREE if (DECL_SECTION_NAME (decl) == NULL_TREE
&& (flag_function_sections && (flag_function_or_data_sections
|| (targetm.have_named_sections || (targetm.have_named_sections
&& DECL_ONE_ONLY (decl)))) && DECL_ONE_ONLY (decl))))
UNIQUE_SECTION (decl, reloc); UNIQUE_SECTION (decl, reloc);
...@@ -1183,7 +1184,7 @@ assemble_start_function (decl, fnname) ...@@ -1183,7 +1184,7 @@ assemble_start_function (decl, fnname)
if (CONSTANT_POOL_BEFORE_FUNCTION) if (CONSTANT_POOL_BEFORE_FUNCTION)
output_constant_pool (fnname, decl); output_constant_pool (fnname, decl);
resolve_unique_section (decl, 0); resolve_unique_section (decl, 0, flag_function_sections);
function_section (decl); function_section (decl);
/* Tell assembler to move to target machine's alignment for functions. */ /* Tell assembler to move to target machine's alignment for functions. */
...@@ -1394,7 +1395,7 @@ asm_emit_uninitialised (decl, name, size, rounded) ...@@ -1394,7 +1395,7 @@ asm_emit_uninitialised (decl, name, size, rounded)
if (destination == asm_dest_bss) if (destination == asm_dest_bss)
globalize_decl (decl); globalize_decl (decl);
resolve_unique_section (decl, 0); resolve_unique_section (decl, 0, flag_data_sections);
if (flag_shared_data) if (flag_shared_data)
{ {
...@@ -1595,7 +1596,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1595,7 +1596,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0; reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0;
else if (DECL_INITIAL (decl)) else if (DECL_INITIAL (decl))
reloc = output_addressed_constants (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. */ /* Handle uninitialized definitions. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment