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]

Re: Some questions on UNIQUE_SECTION and SELECT_SECTION on alpha


On Thu, Jul 12, 2001 at 04:37:43PM -0700, Richard Henderson wrote:
> On Thu, Jul 12, 2001 at 04:36:40PM -0700, H . J . Lu wrote:
> > Then why is the .bss section commented out in UNIQUE_SECTION in
> > config/elfos.h?
> 
> The comment is old.
> 

Did you mean this patch should be ok?


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

	* config/elfos.h (UNIQUE_SECTION): Enable .bss section.

--- gcc/config/elfos.h.bss	Sun May 27 23:18:25 2001
+++ gcc/config/elfos.h	Thu Jul 12 16:42:01 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							\


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