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]
Other format: [Raw text]

Follow up to target hook patch


Richard,

OK for this cleanup if it bootstraps?

Neil.

	* defaults.h (UNIQUE_SECTION): Remove.
	* system.h (UNIQUE_SECTION, SELECT_SECTION): Poison.
	* config/i386/osfrose.h (SELECT_SECTION): Kill.

============================================================
Index: gcc/defaults.h
--- gcc/defaults.h	15 May 2002 08:59:59 -0000	1.74
+++ gcc/defaults.h	17 May 2002 20:39:42 -0000
@@ -238,28 +238,6 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA
 #endif
 #endif
 
-/* If we have no definition for UNIQUE_SECTION, but do have the 
-   ability to generate arbitrary sections, construct something
-   reasonable.  */
-#ifndef UNIQUE_SECTION
-#define UNIQUE_SECTION(DECL,RELOC)				\
-do {								\
-  int len;							\
-  const char *name;						\
-  char *string;							\
-								\
-  name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));	\
-  /* Strip off any encoding in name.  */			\
-  STRIP_NAME_ENCODING (name, name);				\
-								\
-  len = strlen (name) + 1;					\
-  string = alloca (len + 1);					\
-  sprintf (string, ".%s", name);				\
-								\
-  DECL_SECTION_NAME (DECL) = build_string (len, string);	\
-} while (0)
-#endif
-
 /* By default, we generate a label at the beginning and end of the
    text section, and compute the size of the text section by
    subtracting the two.  However, on some platforms that doesn't 
============================================================
Index: gcc/system.h
--- gcc/system.h	15 May 2002 05:29:45 -0000	1.122
+++ gcc/system.h	17 May 2002 20:39:43 -0000
@@ -595,7 +595,7 @@ typedef char _Bool;
 	MERGE_MACHINE_TYPE_ATTRIBUTES MERGE_MACHINE_DECL_ATTRIBUTES	\
 	MD_INIT_BUILTINS MD_EXPAND_BUILTIN ASM_OUTPUT_CONSTRUCTOR	\
 	ASM_OUTPUT_DESTRUCTOR SIGNED_CHAR_SPEC MAX_CHAR_TYPE_SIZE	\
-	WCHAR_UNSIGNED
+	WCHAR_UNSIGNED UNIQUE_SECTION SELECT_SECTION
 
 /* And other obsolete target macros, or macros that used to be in target
    headers and were not used, and may be obsolete or may never have
============================================================
Index: gcc/config/i386/osfrose.h
--- gcc/config/i386/osfrose.h	3 Apr 2002 03:47:41 -0000	1.27
+++ gcc/config/i386/osfrose.h	17 May 2002 20:39:44 -0000
@@ -514,34 +514,6 @@ do									\
   }									\
 while (0)
 
-#undef	SELECT_SECTION
-#define SELECT_SECTION(DECL, RELOC, ALIGN)				\
-{									\
-  if (RELOC && HALF_PIC_P ())						\
-    data_section ();							\
-									\
-  else if (TREE_CODE (DECL) == STRING_CST)				\
-    {									\
-      if (flag_writable_strings)					\
-	data_section ();						\
-      else								\
-	readonly_data_section ();					\
-    }									\
-									\
-  else if (TREE_CODE (DECL) != VAR_DECL)				\
-    readonly_data_section ();						\
-									\
-  else if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)		\
-	   || !DECL_INITIAL (DECL)					\
-	   || (DECL_INITIAL (DECL) != error_mark_node			\
-	       && !TREE_CONSTANT (DECL_INITIAL (DECL))))		\
-    data_section ();							\
-									\
-  else									\
-    readonly_data_section ();						\
-}
-
-
 /* Define the strings used for the special svr4 .type and .size directives.
    These strings generally do not vary from one system running svr4 to
    another, but if a given system (e.g. m88k running svr) needs to use


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