gcc-20000114 ix86 -fdata-sections

Alan Modra alan@SPRI.Levels.UniSA.Edu.Au
Mon Jan 17 03:20:00 GMT 2000


On Sat, 15 Jan 2000, I wrote:
> 
> When running the ld testsuite using gcc-20000114, I encounter an error due
> to missing ".data." from a section name.

I should have spent a little time with gdb before firing off the above
bug report.  Here's the fix.

gcc/ChangeLog
	* config/elfos.h (UNIQUE_SECTION): Restore uninitialised data
	section naming to that prior to 2000-01-07 patch.

--- gcc/config/elfos.h~	Tue Jan 11 19:08:27 2000
+++ gcc/config/elfos.h	Mon Jan 17 21:18:23 2000
@@ -359,23 +359,22 @@
       const char *name;						\
       char *string;						\
       const char *prefix;					\
-      static const char *prefixes[4][2] =			\
+      static const char *prefixes[3][2] =			\
       {								\
 	{ ".text.",   ".gnu.linkonce.t." },			\
 	{ ".rodata.", ".gnu.linkonce.r." },			\
-	{ ".data.",   ".gnu.linkonce.d." },			\
+	{ ".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." }  */			\
-	{ "", "" }						\
       };							\
       								\
       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-patches mailing list