UNIQUE_SECTION patch reverted

H . J . Lu hjl@lucon.org
Fri Jul 13 16:36:00 GMT 2001


On Fri, Jul 13, 2001 at 03:14:47PM -0700, Geoff Keating wrote:
> 
> Hi HJ,
> 
> +2001-07-13  H.J. Lu  (hjl@gnu.org)
> +
> +	* config/elfos.h (UNIQUE_SECTION): Enable .bss section.
> +
> 
> You didn't say on which target you tested this patch, and it broke the
> build on x86-linux, so I have reverted it.
> 
> Please test the patch on x86-linux before resubmitting it as it is
> known to have problems on this platform.

Apparently, I applied the wrong patch with one `;' missing. I did
test it on linux/x86. I ckecked in the correct one now. Sorry for
that.


H.J.
---
2001-07-13  H.J. Lu  (hjl@gnu.org)

	* config/elfos.h (UNIQUE_SECTION): Enable .bss section with
	the correct patch.

--- gcc/config/elfos.h.bss	Thu Apr 26 08:58:49 2001
+++ gcc/config/elfos.h	Fri Jul 12 17:16:50 2001
@@ -343,22 +343,19 @@ dtors_section ()						\
       const char *name;						\
       char *string;						\
       const char *prefix;					\
-      static const char *prefixes[/*4*/3][2] =			\
+      static const char *prefixes[4][2] =			\
       {								\
 	{ ".text.",   ".gnu.linkonce.t." },			\
 	{ ".rodata.", ".gnu.linkonce.r." },			\
-	{ ".data.",   ".gnu.linkonce.d." }			\
-	/* Do not generate unique sections for uninitialised 	\
-	   data since we do not have support for this in the    \
-	   linker scripts yet...				\
-        ,{ ".bss.",    ".gnu.linkonce.b." }  */			\
+	{ ".data.",   ".gnu.linkonce.d." },			\
+	{ ".bss.",    ".gnu.linkonce.b." }			\
       };							\
       								\
       if (TREE_CODE (DECL) == FUNCTION_DECL)			\
 	sec = 0;						\
-  /*  else if (DECL_INITIAL (DECL) == 0				\
+      else if (DECL_INITIAL (DECL) == 0				\
 	       || DECL_INITIAL (DECL) == error_mark_node)	\
-        sec =  3; */						\
+        sec =  3;						\
       else if (DECL_READONLY_SECTION (DECL, RELOC))		\
 	sec = 1;						\
       else							\



More information about the Gcc-regression mailing list