aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <alan@SPRI.Levels.UniSA.Edu.Au>2000-01-22 19:49:21 +0000
committerNick Clifton <nickc@gcc.gnu.org>2000-01-22 19:49:21 +0000
commite8c3586ab810c1806d10074799514372ca29672c (patch)
tree32ca6123fa3f650f20b8e9974c56cee0d9dfbfc2
parent37b80d2e0220b802ff4c122f700711dfad634bb6 (diff)
downloadgcc-e8c3586ab810c1806d10074799514372ca29672c.zip
gcc-e8c3586ab810c1806d10074799514372ca29672c.tar.gz
gcc-e8c3586ab810c1806d10074799514372ca29672c.tar.bz2
Fix definition of UNIQUE_SECTION so that zero initialised data is placed
into .data. From-SVN: r31563
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/elfos.h11
-rw-r--r--gcc/config/i386/interix.c4
-rw-r--r--gcc/config/i386/winnt.c4
-rw-r--r--gcc/config/mips/elf.h7
-rw-r--r--gcc/config/mips/elf64.h7
6 files changed, 25 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1b58f09..cd0077c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2000-01-22 Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
+
+ * config/elfos.h (UNIQUE_SECTION): Restore uninitialised data
+ section naming to that prior to 2000-01-07 patch.
+ * config/mips/elf.h (UNIQUE_SECTION): Ditto.
+ * config/mips/elf64.h (UNIQUE_SECTION): Ditto.
+ * config/mips/iris6gld.h (UNIQUE_SECTION): Ditto.
+ * config/i386/interix.c (UNIQUE_SECTION): Ditto.
+ * config/i386/winnt.c (UNIQUE_SECTION): Ditto.
+
2000-01-22 Bernd Schmidt <bernds@cygnus.co.uk>
* config/arm/arm.c (soft_df_operand): Reject SUBREGs containing a
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 8476c2b..1021954 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -359,23 +359,22 @@ dtors_section () \
const char *name; \
char *string; \
const char *prefix; \
- static const char *prefixes[4][2] = \
+ static const char *prefixes[/*4*/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." } */ \
- { "", "" } \
+ ,{ ".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 \
diff --git a/gcc/config/i386/interix.c b/gcc/config/i386/interix.c
index 4f4f823..bec9287 100644
--- a/gcc/config/i386/interix.c
+++ b/gcc/config/i386/interix.c
@@ -93,9 +93,9 @@ i386_pe_unique_section (decl, reloc)
without a .rdata section. */
if (TREE_CODE (decl) == FUNCTION_DECL)
prefix = ".text$";
- else if (DECL_INITIAL (decl) == 0
+/* else if (DECL_INITIAL (decl) == 0
|| DECL_INITIAL (decl) == error_mark_node)
- prefix = "";
+ prefix = ".bss"; */
else if (DECL_READONLY_SECTION (decl, reloc))
#ifdef READONLY_DATA_SECTION
prefix = ".rdata$";
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 13701e2..32ab783 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -480,9 +480,9 @@ i386_pe_unique_section (decl, reloc)
without a .rdata section. */
if (TREE_CODE (decl) == FUNCTION_DECL)
prefix = ".text$";
- else if (DECL_INITIAL (decl) == 0
+/* else if (DECL_INITIAL (decl) == 0
|| DECL_INITIAL (decl) == error_mark_node)
- prefix = "";
+ prefix = ".bss"; */
else if (DECL_READONLY_SECTION (decl, reloc))
#ifdef READONLY_DATA_SECTION
prefix = ".rdata$";
diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h
index b265295..cd115c0 100644
--- a/gcc/config/mips/elf.h
+++ b/gcc/config/mips/elf.h
@@ -212,12 +212,11 @@ do { \
do { \
int len, size, sec; \
char *name, *string, *prefix; \
- static char *prefixes[5][2] = { \
+ static char *prefixes[4][2] = { \
{ ".text.", ".gnu.linkonce.t." }, \
{ ".rodata.", ".gnu.linkonce.r." }, \
{ ".data.", ".gnu.linkonce.d." }, \
- { ".sdata.", ".gnu.linkonce.s." }, \
- { "", "" } \
+ { ".sdata.", ".gnu.linkonce.s." } \
}; \
\
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
@@ -229,7 +228,7 @@ do { \
sec = 0; \
else if (DECL_INITIAL (DECL) == 0 \
|| DECL_INITIAL (DECL) == error_mark_node) \
- sec = 4; \
+ sec = 2; \
else if ((TARGET_EMBEDDED_PIC || TARGET_MIPS16) \
&& TREE_CODE (decl) == STRING_CST \
&& !flag_writable_strings) \
diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h
index fe5f147..25c88f6 100644
--- a/gcc/config/mips/elf64.h
+++ b/gcc/config/mips/elf64.h
@@ -193,12 +193,11 @@ do { \
do { \
int len, size, sec; \
char *name, *string, *prefix; \
- static char *prefixes[5][2] = { \
+ static char *prefixes[4][2] = { \
{ ".text.", ".gnu.linkonce.t." }, \
{ ".rodata.", ".gnu.linkonce.r." }, \
{ ".data.", ".gnu.linkonce.d." }, \
- { ".sdata.", ".gnu.linkonce.s." }, \
- { "", "" } \
+ { ".sdata.", ".gnu.linkonce.s." } \
}; \
\
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
@@ -210,7 +209,7 @@ do { \
sec = 0; \
else if (DECL_INITIAL (DECL) == 0 \
|| DECL_INITIAL (DECL) == error_mark_node) \
- sec = 4; \
+ sec = 2; \
else if ((TARGET_EMBEDDED_PIC || TARGET_MIPS16) \
&& TREE_CODE (decl) == STRING_CST \
&& !flag_writable_strings) \