summaryrefslogtreecommitdiff
path: root/lib/csu/common_elf/crtend.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-01-08 14:59:16 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-01-08 14:59:16 +0000
commit58b037aa2a117fe4c474549ee14e4c6bfbba585d (patch)
treef5d8f4fd6ca0aa5131b9bc178009e1cae0a1bae3 /lib/csu/common_elf/crtend.c
parent6e07118b4073b7f92810dfdf7b6a0ea317d3ae5f (diff)
__init/__fini handling on ELF has not been correct. It is supposed to
be a section which code stubs (branches) can be added to initialize/destructor This adds MD stubs to allow this to operate as expected. should fix wine and behave according to ELF specs. ok miod@
Diffstat (limited to 'lib/csu/common_elf/crtend.c')
-rw-r--r--lib/csu/common_elf/crtend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/csu/common_elf/crtend.c b/lib/csu/common_elf/crtend.c
index e81d17481f2..484ca3cc5d3 100644
--- a/lib/csu/common_elf/crtend.c
+++ b/lib/csu/common_elf/crtend.c
@@ -1,13 +1,13 @@
-/* $OpenBSD: crtend.c,v 1.2 2002/02/16 21:27:20 millert Exp $ */
+/* $OpenBSD: crtend.c,v 1.3 2004/01/08 14:59:15 drahn Exp $ */
/* $NetBSD: crtend.c,v 1.1 1996/09/12 16:59:04 cgd Exp $ */
-#ifndef ECOFF_COMPAT
-
#include <sys/cdefs.h>
+#include "md_init.h"
static void (*__CTOR_LIST__[1])(void)
__attribute__((section(".ctors"))) = { (void *)0 }; /* XXX */
static void (*__DTOR_LIST__[1])(void)
__attribute__((section(".dtors"))) = { (void *)0 }; /* XXX */
-#endif /* !ECOFF_COMPAT */
+MD_SECTION_EPILOGUE(".init");
+MD_SECTION_EPILOGUE(".fini");