summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-02-19 21:39:33 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-02-19 21:39:33 +0000
commit64686d157bd825393d025c026e486d974626e48b (patch)
tree71ac31b7ea4db48e8b432b77a640344b767be5c8 /lib
parent969b7f9fcfa063fb083707636e4c2166bee0b19a (diff)
Move static variables from .data to .bss by not initializing them to zero
ok kettenis@
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/crtbegin.c6
-rw-r--r--lib/csu/crtbeginS.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/csu/crtbegin.c b/lib/csu/crtbegin.c
index 8b0b401047a..b6f5c7fe373 100644
--- a/lib/csu/crtbegin.c
+++ b/lib/csu/crtbegin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crtbegin.c,v 1.23 2017/01/21 05:46:56 guenther Exp $ */
+/* $OpenBSD: crtbegin.c,v 1.24 2017/02/19 21:39:32 guenther Exp $ */
/* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */
/*
@@ -126,7 +126,7 @@ MD_SECT_CALL_FUNC(".fini", __do_fini);
void
__do_init(void)
{
- static int initialized = 0;
+ static int initialized;
static struct dwarf2_eh_object object;
/*
@@ -148,7 +148,7 @@ __do_init(void)
void
__do_fini(void)
{
- static int finalized = 0;
+ static int finalized;
if (!finalized) {
finalized = 1;
diff --git a/lib/csu/crtbeginS.c b/lib/csu/crtbeginS.c
index 84db538b089..dba5965e878 100644
--- a/lib/csu/crtbeginS.c
+++ b/lib/csu/crtbeginS.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crtbeginS.c,v 1.18 2017/01/21 05:46:56 guenther Exp $ */
+/* $OpenBSD: crtbeginS.c,v 1.19 2017/02/19 21:39:32 guenther Exp $ */
/* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */
/*
@@ -137,7 +137,7 @@ MD_SECT_CALL_FUNC(".fini", _do_fini);
void
_do_init(void)
{
- static int initialized = 0;
+ static int initialized;
/*
* Call global constructors.
@@ -155,7 +155,7 @@ _do_init(void)
void
_do_fini(void)
{
- static int finalized = 0;
+ static int finalized;
if (!finalized) {
finalized = 1;