summaryrefslogtreecommitdiff
path: root/lib/csu/crtend.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-05-01 11:32:44 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-05-01 11:32:44 +0000
commit72189cd2defd70ceb80276539e5fa294dc984851 (patch)
treef02555e0091d306ee6ca92a8cbeef7195aba082a /lib/csu/crtend.c
parentdd2d0472289af6e25a7ba0ac8e710e777f02afcd (diff)
Sprinkle a few __used markers to prevent gcc4 from throwing away essential
bits of code and data. With this change gcc4 builds usable crt*.o on sparc64, other architectures probably need some more love. ok marco@, jsg@
Diffstat (limited to 'lib/csu/crtend.c')
-rw-r--r--lib/csu/crtend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/csu/crtend.c b/lib/csu/crtend.c
index f26b95580ba..6f61be9afa8 100644
--- a/lib/csu/crtend.c
+++ b/lib/csu/crtend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crtend.c,v 1.8 2009/07/14 16:37:31 jsg Exp $ */
+/* $OpenBSD: crtend.c,v 1.9 2010/05/01 11:32:43 kettenis Exp $ */
/* $NetBSD: crtend.c,v 1.1 1996/09/12 16:59:04 cgd Exp $ */
#include <sys/cdefs.h>
@@ -6,16 +6,16 @@
#include "extern.h"
static init_f __CTOR_LIST__[1]
- __attribute__((section(".ctors"))) = { (void *)0 }; /* XXX */
+ __used __attribute__((section(".ctors"))) = { (void *)0 }; /* XXX */
static init_f __DTOR_LIST__[1]
- __attribute__((section(".dtors"))) = { (void *)0 }; /* XXX */
+ __used __attribute__((section(".dtors"))) = { (void *)0 }; /* XXX */
static const int __EH_FRAME_END__[]
-__attribute__((unused, section(".eh_frame"), aligned(4))) = { 0 };
+ __used __attribute__((section(".eh_frame"), aligned(4))) = { 0 };
#if (__GNUC__ > 2)
static void * __JCR_END__[]
-__attribute__((unused, section(".jcr"), aligned(sizeof(void*)))) = { 0 };
+ __used __attribute__((section(".jcr"), aligned(sizeof(void*)))) = { 0 };
#endif
MD_SECTION_EPILOGUE(".init");