This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

remove "align" parameter from named_section hook


The align parameter was to be used for Irix6 assembler quirks, but that
doesn't actually solve the problem properly, so I'm going to do it a
different way.

I've split this out of a larger change that's intended to actually
fix Irix; this by itself doesn't do the job, but this is more
repetative.


r~


        * varasm.c (named_section_flags): Remove align parameter.
        * varasm.c, dwarf2out.c: Update all callers.
        * output.h: Update prototypes.

        * target.h (target.asm_out.named_section): Remove align parameter.
        * varasm.c, config/a29k/a29k.c, config/alpha/alpha.c,
        config/arm/arm.c, config/c4x/c4x.c, config/h8300/h8300.c,
        config/i386/i386.c, config/i386/winnt.c, config/m68k/m68k.c,
        config/mcore/mcore.c, config/mips/mips.c, config/rs6000/rs6000.c,
        config/sh/sh.c, config/sparc/sparc.c: Update implementations to match.

        * varasm.c (in_named_entry_eq, in_named_entry_hash): New.
        (get_named_section_flags, set_named_section_flags): New.
        (named_section_flags): Use them.
        (named_section): Do decl vs section flags check here...
        (default_section_type_flags): ... not here.
        (init_varasm_once): Create in_named_htab.
        (resolve_unique_section): Mark reloc unused.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.302
diff -c -p -d -u -r1.302 dwarf2out.c
--- dwarf2out.c	2001/08/14 19:12:34	1.302
+++ dwarf2out.c	2001/08/17 02:29:12
@@ -1738,8 +1738,7 @@ output_call_frame_info (for_eh)
   if (for_eh)
     {
 #ifdef EH_FRAME_SECTION_NAME
-      named_section_flags (EH_FRAME_SECTION_NAME, SECTION_WRITE,
-			   DWARF_OFFSET_SIZE);
+      named_section_flags (EH_FRAME_SECTION_NAME, SECTION_WRITE);
 #else
       tree label = get_file_function_name ('F');
 
@@ -1751,7 +1750,7 @@ output_call_frame_info (for_eh)
       assemble_label ("__FRAME_BEGIN__");
     }
   else
-    named_section_flags (DEBUG_FRAME_SECTION, SECTION_DEBUG, 1);
+    named_section_flags (DEBUG_FRAME_SECTION, SECTION_DEBUG);
 
   /* Output the CIE.  */
   ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh);
@@ -6322,7 +6321,7 @@ output_comp_unit (die)
     secname = (const char *) DEBUG_INFO_SECTION;
 
   /* Output debugging information.  */
-  named_section_flags (secname, SECTION_DEBUG, 1);
+  named_section_flags (secname, SECTION_DEBUG);
   output_compilation_unit_header ();
   output_die (die);
 
@@ -11560,7 +11559,7 @@ dwarf2out_start_source_file (lineno, fil
     }
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       dw2_asm_output_data (1, DW_MACINFO_start_file, "Start new file");
       dw2_asm_output_data_uleb128 (lineno, "Included from line number %d",
 				   lineno);
@@ -11582,7 +11581,7 @@ dwarf2out_end_source_file (lineno)
     }
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       dw2_asm_output_data (1, DW_MACINFO_end_file, "End file");
     }
 }
@@ -11604,7 +11603,7 @@ dwarf2out_define (lineno, buffer)
     }
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       dw2_asm_output_data (1, DW_MACINFO_define, "Define macro");
       dw2_asm_output_data_uleb128 (lineno, "At line number %d", lineno);
       dw2_asm_output_nstring (buffer, -1, "The macro");
@@ -11622,7 +11621,7 @@ dwarf2out_undef (lineno, buffer)
 {
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       dw2_asm_output_data (1, DW_MACINFO_undef, "Undefine macro");
       dw2_asm_output_data_uleb128 (lineno, "At line number %d", lineno);
       dw2_asm_output_nstring (buffer, -1, "The macro");
@@ -11695,17 +11694,17 @@ dwarf2out_init (main_input_filename)
   ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
 			       DEBUG_LINE_SECTION_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (loc_section_label, DEBUG_LOC_SECTION_LABEL, 0);
-  named_section_flags (DEBUG_LOC_SECTION, SECTION_DEBUG, 1);
+  named_section_flags (DEBUG_LOC_SECTION, SECTION_DEBUG);
   ASM_OUTPUT_LABEL (asm_out_file, loc_section_label);
-  named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG, 1);
+  named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG);
   ASM_OUTPUT_LABEL (asm_out_file, abbrev_section_label);
-  named_section_flags (DEBUG_INFO_SECTION, SECTION_DEBUG, 1);
+  named_section_flags (DEBUG_INFO_SECTION, SECTION_DEBUG);
   ASM_OUTPUT_LABEL (asm_out_file, debug_info_section_label);
-  named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG, 1);
+  named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG);
   ASM_OUTPUT_LABEL (asm_out_file, debug_line_section_label);
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
 				   DEBUG_MACINFO_SECTION_LABEL, 0);
       ASM_OUTPUT_LABEL (asm_out_file, macinfo_section_label);
@@ -11782,7 +11781,7 @@ dwarf2out_finish (input_filename)
      examining the file.  */
   if (! DWARF2_ASM_LINE_DEBUG_INFO)
     {
-      named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG);
       output_line_info ();
     }
 
@@ -11813,13 +11812,13 @@ dwarf2out_finish (input_filename)
   output_comp_unit (comp_unit_die);
 
   /* Output the abbreviation table.  */
-  named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG, 1);
+  named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG);
   output_abbrev_section ();
 
   if (pubname_table_in_use)
     {
       /* Output public names table.  */
-      named_section_flags (DEBUG_PUBNAMES_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_PUBNAMES_SECTION, SECTION_DEBUG);
       output_pubnames ();
     }
 
@@ -11828,7 +11827,7 @@ dwarf2out_finish (input_filename)
   if (fde_table_in_use)
     {
       /* Output the address range information.  */
-      named_section_flags (DEBUG_ARANGES_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_ARANGES_SECTION, SECTION_DEBUG);
       output_aranges ();
     }
 
@@ -11836,7 +11835,7 @@ dwarf2out_finish (input_filename)
   if (have_location_lists)
     {
       /* Output the location lists info.  */
-      named_section_flags (DEBUG_LOC_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_LOC_SECTION, SECTION_DEBUG);
       output_location_lists (die);
       have_location_lists = 0;
     }
@@ -11844,14 +11843,14 @@ dwarf2out_finish (input_filename)
   /* Output ranges section if necessary.  */
   if (ranges_table_in_use)
     {
-      named_section_flags (DEBUG_RANGES_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_RANGES_SECTION, SECTION_DEBUG);
       output_ranges ();
     }
 
   /* Have to end the primary source file.  */
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     { 
-      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG, 1);
+      named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
       dw2_asm_output_data (1, DW_MACINFO_end_file, "End file");
     }
 }
Index: output.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/output.h,v
retrieving revision 1.71
diff -c -p -d -u -r1.71 output.h
--- output.h	2001/08/16 15:41:05	1.71
+++ output.h	2001/08/17 02:29:12
@@ -454,21 +454,19 @@ extern void no_asm_to_stream PARAMS ((FI
 #define SECTION_FORGET	   64	/* forget that we've entered the section */
 #define SECTION_MACH_DEP  128	/* subsequent bits reserved for target */
 
-extern void named_section_flags		PARAMS ((const char *, unsigned int,
-						 unsigned int));
+extern unsigned int get_named_section_flags PARAMS ((const char *));
+extern bool set_named_section_flags	PARAMS ((const char *, unsigned int));
+extern void named_section_flags		PARAMS ((const char *, unsigned int));
 
 union tree_node;
 extern unsigned int default_section_type_flags PARAMS ((union tree_node *,
 							const char *, int));
 
-extern void default_no_named_section PARAMS ((const char *, unsigned int,
-					      unsigned int));
-extern void default_elf_asm_named_section PARAMS ((const char *, unsigned int,
-					      unsigned int));
-extern void default_coff_asm_named_section PARAMS ((const char *, unsigned int,
-					      unsigned int));
-extern void default_pe_asm_named_section PARAMS ((const char *, unsigned int,
-					      unsigned int));
+extern void default_no_named_section PARAMS ((const char *, unsigned int));
+extern void default_elf_asm_named_section PARAMS ((const char *, unsigned int));
+extern void default_coff_asm_named_section PARAMS ((const char *,
+						    unsigned int));
+extern void default_pe_asm_named_section PARAMS ((const char *, unsigned int));
 
 extern void default_stabs_asm_out_destructor PARAMS ((struct rtx_def *, int));
 extern void default_named_section_asm_out_destructor PARAMS ((struct rtx_def *,
Index: target.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target.h,v
retrieving revision 1.11
diff -c -p -d -u -r1.11 target.h
--- target.h	2001/08/09 22:33:18	1.11
+++ target.h	2001/08/17 02:29:12
@@ -67,11 +67,9 @@ struct gcc_target
     /* Output the assembler code for function exit.  */
     void (* function_epilogue) PARAMS ((FILE *, HOST_WIDE_INT));
 
-    /* Switch to an arbitrary section NAME with attributes as specified
-       by FLAGS.  ALIGN specifies any known alignment requirements for
-       the section; 0 if the default should be used.  */
-    void (* named_section) PARAMS ((const char *, unsigned int,
-				    unsigned int));
+    /* Switch to an arbitrary section NAME with attributes as
+       specified by FLAGS.  */
+    void (* named_section) PARAMS ((const char *, unsigned int));
 
     /* Output a constructor for a symbol with a given priority.  */
     void (* constructor) PARAMS ((struct rtx_def *, int));
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.194
diff -c -p -d -u -r1.194 varasm.c
--- varasm.c	2001/08/17 02:03:36	1.194
+++ varasm.c	2001/08/17 02:29:12
@@ -165,6 +165,8 @@ static void output_constructor		PARAMS (
 #ifdef ASM_WEAKEN_LABEL
 static void remove_from_pending_weak_list	PARAMS ((const char *));
 #endif
+static int in_named_entry_eq		PARAMS ((const PTR, const PTR));
+static hashval_t in_named_entry_hash	PARAMS ((const PTR));
 #ifdef ASM_OUTPUT_BSS
 static void asm_output_bss		PARAMS ((FILE *, tree, const char *, int, int));
 #endif
@@ -209,6 +211,16 @@ static enum in_section { no_section, in_
 /* Text of section name when in_section == in_named.  */
 static const char *in_named_name;
 
+/* Hash table of flags that have been used for a particular named section.  */
+
+struct in_named_entry
+{
+  const char *name;
+  unsigned int flags;
+};
+
+static htab_t in_named_htab;
+
 /* Define functions like text_section for any extra sections.  */
 #ifdef EXTRA_SECTION_FUNCTIONS
 EXTRA_SECTION_FUNCTIONS
@@ -286,17 +298,86 @@ in_data_section ()
   return in_section == in_data;
 }
 
+/* Helper routines for maintaining in_named_htab.  */
+
+static int
+in_named_entry_eq (p1, p2)
+     const PTR p1;
+     const PTR p2;
+{
+  const struct in_named_entry *old = p1;
+  const char *new = p2;
+
+  return strcmp (old->name, new) == 0;
+}
+
+static hashval_t
+in_named_entry_hash (p)
+     const PTR p;
+{
+  const struct in_named_entry *old = p;
+  return htab_hash_string (old->name);
+}
+
+/* If SECTION has been seen before as a named section, return the flags
+   that were used.  Otherwise, return 0.  Note, that 0 is a perfectly valid
+   set of flags for a section to have, so 0 does not mean that the section
+   has not been seen.  */
+
+unsigned int
+get_named_section_flags (section)
+     const char *section;
+{
+  struct in_named_entry **slot;
+
+  slot = (struct in_named_entry**)
+    htab_find_slot_with_hash (in_named_htab, section,
+			      htab_hash_string (section), NO_INSERT);
+
+  return slot ? (*slot)->flags : 0;
+}
+
+/* Record FLAGS for SECTION.  If SECTION was previously recorded with a
+   different set of flags, return false.  */
+
+bool
+set_named_section_flags (section, flags)
+     const char *section;
+     unsigned int flags;
+{
+  struct in_named_entry **slot, *entry;
+
+  slot = (struct in_named_entry**)
+    htab_find_slot_with_hash (in_named_htab, section,
+			      htab_hash_string (section), INSERT);
+  entry = *slot;
+
+  if (!entry)
+    {
+      entry = (struct in_named_entry *) xmalloc (sizeof (*entry));
+      *slot = entry;
+      entry->name = ggc_strdup (section);
+      entry->flags = flags;
+    }
+  else if (entry->flags != flags)
+    return false;
+
+  return true;
+}
+
 /* Tell assembler to change to section NAME with attributes FLAGS.  */
 
 void
-named_section_flags (name, flags, align)
+named_section_flags (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align;
 {
-  if (in_section != in_named || strcmp (name, in_named_name))
+  if (in_section != in_named || strcmp (name, in_named_name) != 0)
     {
-      (* targetm.asm_out.named_section) (name, flags, align);
+      if (! set_named_section_flags (name, flags))
+	abort ();
+
+      (* targetm.asm_out.named_section) (name, flags);
 
       if (flags & SECTION_FORGET)
 	in_section = no_section;
@@ -327,7 +408,16 @@ named_section (decl, name, reloc)
     name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
 
   flags = (* targetm.section_type_flags) (decl, name, reloc);
-  named_section_flags (name, flags, 0);
+
+  /* Sanity check user variables for flag changes.  Non-user
+     section flag changes will abort in named_section_flags.  */
+  if (decl && ! set_named_section_flags (name, flags))
+    {
+      error_with_decl (decl, "%s causes a section type conflict");
+      flags = get_named_section_flags (name);
+    }
+
+  named_section_flags (name, flags);
 }
 
 /* If required, set DECL_SECTION_NAME to a unique name.  */
@@ -335,7 +425,7 @@ named_section (decl, name, reloc)
 static void
 resolve_unique_section (decl, reloc)
      tree decl;
-     int reloc;
+     int reloc ATTRIBUTE_UNUSED;
 {
   if (DECL_SECTION_NAME (decl) == NULL_TREE
       && (flag_function_sections
@@ -855,7 +945,8 @@ default_named_section_asm_out_destructor
       section = buf;
     }
 
-  named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+  named_section_flags (section, SECTION_WRITE);
+  assemble_align (POINTER_SIZE);
   assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, 1);
 }
 
@@ -915,7 +1006,7 @@ default_named_section_asm_out_constructo
       section = buf;
     }
 
-  named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+  named_section_flags (section, SECTION_WRITE);
   assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, 1);
 }
 
@@ -4820,6 +4911,9 @@ init_varasm_once ()
 {
   const_str_htab = htab_create (128, const_str_htab_hash, const_str_htab_eq,
   				const_str_htab_del);
+  in_named_htab = htab_create (31, in_named_entry_hash,
+			       in_named_entry_eq, NULL);
+
   ggc_add_root (const_hash_table, MAX_HASH_TABLE, sizeof const_hash_table[0],
 		mark_const_hash_entry);
   ggc_add_root (&const_str_htab, 1, sizeof const_str_htab,
@@ -4831,12 +4925,7 @@ init_varasm_once ()
    might contain runtime relocations.
 
    We make the section read-only and executable for a function decl,
-   read-only for a const data decl, and writable for a non-const data decl.
-
-   If the section has already been defined, to not allow it to have
-   different attributes, as (1) this is ambiguous since we're not seeing
-   all the declarations up front and (2) some assemblers (e.g. SVR4)
-   do not recoginize section redefinitions.  */
+   read-only for a const data decl, and writable for a non-const data decl.  */
 
 unsigned int
 default_section_type_flags (decl, name, reloc)
@@ -4844,16 +4933,8 @@ default_section_type_flags (decl, name, 
      const char *name;
      int reloc;
 {
-  static htab_t htab;
   unsigned int flags;
-  unsigned int **slot;
 
-  /* The names we put in the hashtable will always be the unique
-     versions gived to us by the stringtable, so we can just use
-     their addresses as the keys.  */
-  if (!htab)
-    htab = htab_create (31, htab_hash_pointer, htab_eq_pointer, NULL);
-
   if (decl && TREE_CODE (decl) == FUNCTION_DECL)
     flags = SECTION_CODE;
   else if (decl && DECL_READONLY_SECTION (decl, reloc))
@@ -4872,19 +4953,6 @@ default_section_type_flags (decl, name, 
       || strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
     flags |= SECTION_BSS;
 
-  /* See if we already have an entry for this section.  */
-  slot = (unsigned int **) htab_find_slot (htab, name, INSERT);
-  if (!*slot)
-    {
-      *slot = (unsigned int *) xmalloc (sizeof (unsigned int));
-      **slot = flags;
-    }
-  else
-    {
-      if (decl && **slot != flags)
-	error_with_decl (decl, "%s causes a section type conflict");
-    }
-
   return flags;
 }
 
@@ -4892,10 +4960,9 @@ default_section_type_flags (decl, name, 
    Four variants for common object file formats.  */
 
 void
-default_no_named_section (name, flags, align)
+default_no_named_section (name, flags)
      const char *name ATTRIBUTE_UNUSED;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   /* Some object formats don't support named sections at all.  The
      front-end should already have flagged this as an error.  */
@@ -4903,10 +4970,9 @@ default_no_named_section (name, flags, a
 }
 
 void
-default_elf_asm_named_section (name, flags, align)
+default_elf_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   char flagchars[8], *f = flagchars;
   const char *type;
@@ -4931,10 +4997,9 @@ default_elf_asm_named_section (name, fla
 }
 
 void
-default_coff_asm_named_section (name, flags, align)
+default_coff_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   char flagchars[8], *f = flagchars;
 
@@ -4948,12 +5013,11 @@ default_coff_asm_named_section (name, fl
 }
 
 void
-default_pe_asm_named_section (name, flags, align)
+default_pe_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
-  default_coff_asm_named_section (name, flags, align);
+  default_coff_asm_named_section (name, flags);
 
   if (flags & SECTION_LINKONCE)
     {
Index: config/a29k/a29k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/a29k/a29k.c,v
retrieving revision 1.20
diff -c -p -d -u -r1.20 a29k.c
--- config/a29k/a29k.c	2001/08/09 22:33:20	1.20
+++ config/a29k/a29k.c	2001/08/17 02:29:12
@@ -48,8 +48,7 @@ static void compute_regstack_size PARAMS
 static void check_epilogue_internal_label PARAMS ((FILE *));
 static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void a29k_asm_named_section PARAMS ((const char *, unsigned int,
-					    unsigned int));
+static void a29k_asm_named_section PARAMS ((const char *, unsigned int));
 
 #define min(A,B)	((A) < (B) ? (A) : (B))
 
@@ -1572,10 +1571,9 @@ output_function_epilogue (file, size)
 }
 
 static void
-a29k_asm_named_section (name, flags, align)
+a29k_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   /* ??? Is it really correct to mark all sections as "bss"?  */
   fprintf (asm_out_file, "\t.sect %s, bss\n\t.use %s\n", name, name);
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.181
diff -c -p -d -u -r1.181 alpha.c
--- config/alpha/alpha.c	2001/08/13 15:52:22	1.181
+++ config/alpha/alpha.c	2001/08/17 02:29:12
@@ -151,8 +151,7 @@ static void alpha_output_function_end_pr
 #if TARGET_ABI_OPEN_VMS
 static int vms_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree));
 static unsigned int vms_section_type_flags PARAMS ((tree, const char *, int));
-static void vms_asm_named_section PARAMS ((const char *, unsigned int,
-					   unsigned int));
+static void vms_asm_named_section PARAMS ((const char *, unsigned int));
 static void vms_asm_out_constructor PARAMS ((rtx, int));
 static void vms_asm_out_destructor PARAMS ((rtx, int));
 # undef TARGET_VALID_DECL_ATTRIBUTE
@@ -6568,10 +6567,9 @@ vms_section_type_flags (decl, name, relo
    the section; 0 if the default should be used.  */
 
 static void
-vms_asm_named_section (name, flags, align)
+vms_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align;
 {
   const char *flag_str = "";
 
@@ -6581,11 +6579,6 @@ vms_asm_named_section (name, flags, alig
     flag_str = ",NOWRT";
 
   fprintf (asm_out_file, ".section\t%s%s\n", name, flag_str);
-
-  /* ??? An indicated alignment of 1 byte is only used by dwarf,
-     and for that we turn off auto-alignment.  */
-  if (align == 1)
-    ASM_OUTPUT_ALIGN (asm_out_file, 0);
 }
 
 /* Record an element in the table of global constructors.  SYMBOL is
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.158
diff -c -p -d -u -r1.158 arm.c
--- config/arm/arm.c	2001/08/14 20:49:22	1.158
+++ config/arm/arm.c	2001/08/17 02:29:13
@@ -116,7 +116,6 @@ static void	 thumb_output_function_prolo
 static int	 arm_comp_type_attributes	PARAMS ((tree, tree));
 static void	 arm_set_default_type_attributes	PARAMS ((tree));
 static void	 arm_elf_asm_named_section	PARAMS ((const char *,
-							 unsigned int,
 							 unsigned int));
 #undef Hint
 #undef Mmode
@@ -10829,10 +10828,9 @@ aof_dump_imports (f)
    used before the section type.  */
 
 static void
-arm_elf_asm_named_section (name, flags, align)
+arm_elf_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   char flagchars[8], *f = flagchars;
   const char *type;
Index: config/c4x/c4x.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.c,v
retrieving revision 1.90
diff -c -p -d -u -r1.90 c4x.c
--- config/c4x/c4x.c	2001/08/13 15:52:24	1.90
+++ config/c4x/c4x.c	2001/08/17 02:29:13
@@ -193,8 +193,7 @@ static int c4x_rptb_valid_p PARAMS ((rtx
 static int c4x_label_ref_used_p PARAMS ((rtx, rtx));
 static int c4x_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
 static void c4x_insert_attributes PARAMS ((tree, tree *));
-static void c4x_asm_named_section PARAMS ((const char *, unsigned int,
-					   unsigned int));
+static void c4x_asm_named_section PARAMS ((const char *, unsigned int));
 
 /* Initialize the GCC target structure.  */
 #undef TARGET_VALID_TYPE_ATTRIBUTE
@@ -5183,10 +5182,9 @@ c4x_expand_builtin (exp, target, subtarg
 }
 
 static void
-c4x_asm_named_section (name, flags, align)
+c4x_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name);
 }
Index: config/h8300/h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.63
diff -c -p -d -u -r1.63 h8300.c
--- config/h8300/h8300.c	2001/08/04 01:31:33	1.63
+++ config/h8300/h8300.c	2001/08/17 02:29:13
@@ -56,8 +56,7 @@ static const char *cond_string PARAMS ((
 static int h8300_valid_decl_attribute PARAMS ((tree, tree, tree, tree));
 static void h8300_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void h8300_asm_named_section PARAMS ((const char *, unsigned int,
-					     unsigned int));
+static void h8300_asm_named_section PARAMS ((const char *, unsigned int));
 
 /* CPU_TYPE, says what cpu we're compiling for.  */
 int cpu_type;
@@ -3329,10 +3328,9 @@ h8300_adjust_insn_length (insn, length)
 }
 
 static void
-h8300_asm_named_section (name, flags, align)
+h8300_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   /* ??? Perhaps we should be using default_coff_asm_named_section.  */
   fprintf (asm_out_file, "\t.section %s\n", name);
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.297
diff -c -p -d -u -r1.297 i386.c
--- config/i386/i386.c	2001/08/16 13:32:22	1.297
+++ config/i386/i386.c	2001/08/17 02:29:13
@@ -612,8 +612,7 @@ static int ix86_comp_type_attributes PAR
 static void ix86_svr3_asm_out_constructor PARAMS ((rtx, int));
 #endif
 #if defined(TARGET_ELF) && defined(TARGET_COFF)
-static void sco_asm_named_section PARAMS ((const char *, unsigned int,
-					   unsigned int));
+static void sco_asm_named_section PARAMS ((const char *, unsigned int));
 static void sco_asm_out_constructor PARAMS ((rtx, int));
 #endif
 
@@ -2342,7 +2341,7 @@ ix86_asm_file_end (file)
 			      error_mark_node);
       DECL_ONE_ONLY (decl) = 1;
       UNIQUE_SECTION (decl, 0);
-      named_section (decl, NULL, 0);
+      named_section (decl, NULL);
     }
   else
 #else
@@ -10839,15 +10838,14 @@ ix86_svr3_asm_out_constructor (symbol, p
 
 #if defined(TARGET_ELF) && defined(TARGET_COFF)
 static void
-sco_asm_named_section (name, flags, align)
+sco_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align;
 {
   if (TARGET_ELF)
-    default_elf_asm_named_section (name, flags, align);
+    default_elf_asm_named_section (name, flags);
   else
-    default_coff_asm_named_section (name, flags, align);
+    default_coff_asm_named_section (name, flags);
 }
 
 static void
Index: config/i386/winnt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/winnt.c,v
retrieving revision 1.23
diff -c -p -d -u -r1.23 winnt.c
--- config/i386/winnt.c	2001/08/04 01:31:34	1.23
+++ config/i386/winnt.c	2001/08/17 02:29:13
@@ -523,10 +523,9 @@ i386_pe_section_type_flags (decl, name, 
 }
 
 void
-i386_pe_asm_named_section (name, flags, align)
+i386_pe_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   char flagchars[8], *f = flagchars;
 
Index: config/m68k/m68k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.c,v
retrieving revision 1.53
diff -c -p -d -u -r1.53 m68k.c
--- config/m68k/m68k.c	2001/08/10 16:56:53	1.53
+++ config/m68k/m68k.c	2001/08/17 02:29:13
@@ -61,8 +61,7 @@ static rtx find_addr_reg PARAMS ((rtx));
 static const char *singlemove_string PARAMS ((rtx *));
 static void m68k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void m68k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void m68k_coff_asm_named_section PARAMS ((const char *, unsigned int,
-						 unsigned int));
+static void m68k_coff_asm_named_section PARAMS ((const char *, unsigned int));
 #ifdef CTOR_LIST_BEGIN
 static void m68k_svr3_asm_out_constructor PARAMS ((rtx, int));
 #endif
@@ -4218,10 +4217,9 @@ output_xorsi3 (operands)
 /* Output assembly to switch to section NAME with attribute FLAGS.  */
 
 static void
-m68k_coff_asm_named_section (name, flags, align)
+m68k_coff_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   char flagchar;
 
Index: config/mcore/mcore.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore.c,v
retrieving revision 1.16
diff -c -p -d -u -r1.16 mcore.c
--- config/mcore/mcore.c	2001/08/04 01:31:36	1.16
+++ config/mcore/mcore.c	2001/08/17 02:29:13
@@ -133,7 +133,6 @@ static int        mcore_dllimport_p     
 static int        mcore_valid_decl_attribute   PARAMS ((tree, tree,
 							tree, tree));
 static void	  mcore_asm_named_section      PARAMS ((const char *,
-							unsigned int,
 							unsigned int));
 
 /* Initialize the GCC target structure.  */
@@ -3599,10 +3598,9 @@ mcore_naked_function_p ()
 }
 
 static void
-mcore_asm_named_section (name, flags, align)
+mcore_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   fprintf (asm_out_file, "\t.section %s\n", name);
 }
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.138
diff -c -p -d -u -r1.138 mips.c
--- config/mips/mips.c	2001/08/10 13:08:16	1.138
+++ config/mips/mips.c	2001/08/17 02:29:14
@@ -116,7 +116,6 @@ static void mips_output_function_epilogu
 static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static enum processor_type mips_parse_cpu       PARAMS ((const char *));
 static void iris6_asm_named_section		PARAMS ((const char *,
-							 unsigned int,
 							 unsigned int));
 /* Global variables for machine-dependent things.  */
 
@@ -9754,10 +9753,9 @@ mips_parse_cpu (cpu_string)
 /* Output assembly to switch to section NAME with attribute FLAGS.  */
 
 static void
-iris6_asm_named_section (name, flags, align)
+iris6_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align;
 {
   unsigned int sh_type, sh_flags, sh_entsize;
 
@@ -9785,16 +9783,8 @@ iris6_asm_named_section (name, flags, al
   else
     sh_entsize = 0;
 
-  if (align == 0)
-    {
-      if (flags & SECTION_CODE)
-	align = 4;
-      else
-	align = 8;
-    }
-
   fprintf (asm_out_file, "\t.section %s,%u,%u,%u,%u\n",
-	   name, sh_type, sh_flags, sh_entsize, align);
+	   name, sh_type, sh_flags, sh_entsize, 0);
 }
 
 /* Cover function for UNIQUE_SECTION.  */
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.199
diff -c -p -d -u -r1.199 rs6000.c
--- config/rs6000/rs6000.c	2001/08/13 18:05:43	1.199
+++ config/rs6000/rs6000.c	2001/08/17 02:29:14
@@ -139,8 +139,7 @@ static void rs6000_elf_asm_out_construct
 static void rs6000_elf_asm_out_destructor PARAMS ((rtx, int));
 #endif
 #ifdef OBJECT_FORMAT_COFF
-static void xcoff_asm_named_section PARAMS ((const char *, unsigned int,
-					     unsigned int));
+static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
 #endif
 
 /* Default register names.  */
@@ -8736,7 +8735,8 @@ rs6000_elf_asm_out_constructor (symbol, 
       section = buf;
     }
 
-  named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+  named_section_flags (section, SECTION_WRITE);
+  assemble_align (POINTER_SIZE);
 
   if (TARGET_RELOCATABLE)
     {
@@ -8766,7 +8766,8 @@ rs6000_elf_asm_out_destructor (symbol, p
       section = buf;
     }
 
-  named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+  named_section_flags (section, SECTION_WRITE);
+  assemble_align (POINTER_SIZE);
 
   if (TARGET_RELOCATABLE)
     {
@@ -8781,10 +8782,9 @@ rs6000_elf_asm_out_destructor (symbol, p
 
 #ifdef OBJECT_FORMAT_COFF
 static void
-xcoff_asm_named_section (name, flags, align)
+xcoff_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   fprintf (asm_out_file, "\t.csect %s\n", name);
 }
Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.115
diff -c -p -d -u -r1.115 sh.c
--- config/sh/sh.c	2001/08/13 15:52:34	1.115
+++ config/sh/sh.c	2001/08/17 02:29:14
@@ -157,8 +157,7 @@ static rtx mark_constant_pool_use PARAMS
 static int sh_valid_decl_attribute PARAMS ((tree, tree, tree, tree));
 static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static void sh_insert_attributes PARAMS ((tree, tree *));
-static void sh_asm_named_section PARAMS ((const char *, unsigned int,
-					  unsigned int));
+static void sh_asm_named_section PARAMS ((const char *, unsigned int));
 
 /* Initialize the GCC target structure.  */
 #undef TARGET_VALID_DECL_ATTRIBUTE
@@ -5560,10 +5559,9 @@ sh_can_redirect_branch (branch1, branch2
 }
 
 static void
-sh_asm_named_section (name, flags, align)
+sh_asm_named_section (name, flags)
      const char *name;
      unsigned int flags ATTRIBUTE_UNUSED;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   /* ??? Perhaps we should be using default_coff_asm_named_section.  */
   fprintf (asm_out_file, "\t.section %s\n", name);
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.148
diff -c -p -d -u -r1.148 sparc.c
--- config/sparc/sparc.c	2001/08/13 15:52:36	1.148
+++ config/sparc/sparc.c	2001/08/17 02:29:14
@@ -167,8 +167,7 @@ static void sparc_nonflat_function_epilo
 						     int));
 static void sparc_nonflat_function_prologue PARAMS ((FILE *, HOST_WIDE_INT,
 						     int));
-static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int,
-						 unsigned int));
+static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int));
 
 /* Option handling.  */
 
@@ -8695,10 +8694,9 @@ sparc_add_gc_roots ()
 }
 
 static void
-sparc_elf_asm_named_section (name, flags, align)
+sparc_elf_asm_named_section (name, flags)
      const char *name;
      unsigned int flags;
-     unsigned int align ATTRIBUTE_UNUSED;
 {
   fprintf (asm_out_file, "\t.section\t\"%s\"", name);
 
Index: java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.106
diff -c -p -d -u -r1.106 class.c
--- java/class.c	2001/08/10 07:52:21	1.106
+++ java/class.c	2001/08/17 02:29:15
@@ -1889,8 +1889,8 @@ emit_register_classes ()
     {
 #ifdef JCR_SECTION_NAME
       tree t;
-      named_section_flags (JCR_SECTION_NAME, SECTION_WRITE,
-			   POINTER_SIZE / BITS_PER_UNIT);
+      named_section_flags (JCR_SECTION_NAME, SECTION_WRITE);
+      assemble_align (POINTER_SIZE);
       for (t = registered_class; t; t = TREE_CHAIN (t))
 	assemble_integer (XEXP (DECL_RTL (t), 0),
 			  POINTER_SIZE / BITS_PER_UNIT, 1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]