aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>2000-01-05 23:26:06 +0000
committerNick Clifton <nickc@gcc.gnu.org>2000-01-05 23:26:06 +0000
commita56e7c0854c156a0555743d1b98597c650cf6499 (patch)
tree08dc8144ea0c144d00260987143d8dae09166953 /gcc/config/i386
parentd6ab24c514d5114ebd4af03bd765fa922bba9764 (diff)
downloadgcc-a56e7c0854c156a0555743d1b98597c650cf6499.zip
gcc-a56e7c0854c156a0555743d1b98597c650cf6499.tar.gz
gcc-a56e7c0854c156a0555743d1b98597c650cf6499.tar.bz2
Add support for generating unique sections for unitialised data.
From-SVN: r31250
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/interix.c3
-rw-r--r--gcc/config/i386/winnt.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/i386/interix.c b/gcc/config/i386/interix.c
index 5a2b8b6..4f4f823 100644
--- a/gcc/config/i386/interix.c
+++ b/gcc/config/i386/interix.c
@@ -93,6 +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
+ || DECL_INITIAL (decl) == error_mark_node)
+ prefix = "";
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 2c2ce76..13701e2 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -480,6 +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
+ || DECL_INITIAL (decl) == error_mark_node)
+ prefix = "";
else if (DECL_READONLY_SECTION (decl, reloc))
#ifdef READONLY_DATA_SECTION
prefix = ".rdata$";