OSDN Git Service

* varasm.c (resolve_unique_section): Add third parameter
authorschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 May 2002 08:35:59 +0000 (08:35 +0000)
committerschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 May 2002 08:35:59 +0000 (08:35 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53449 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varasm.c

index d4eb4fd..65cca91 100644 (file)
@@ -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.
index 1d9522e..cb19e4f 100644 (file)
@@ -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));
 \f
 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.  */