aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/amd64/crt1_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csu/amd64/crt1_c.c')
-rw-r--r--lib/csu/amd64/crt1_c.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/lib/csu/amd64/crt1_c.c b/lib/csu/amd64/crt1_c.c
index f1c99de9ffe0..85fe0309600c 100644
--- a/lib/csu/amd64/crt1_c.c
+++ b/lib/csu/amd64/crt1_c.c
@@ -1,6 +1,6 @@
/* LINTLIBRARY */
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright 1996-1998 John D. Polstra.
* All rights reserved.
@@ -27,48 +27,4 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdlib.h>
-
-#include "libc_private.h"
-#include "ignore_init.c"
-
-#ifdef GCRT
-extern void _mcleanup(void);
-extern void monstartup(void *, void *);
-extern int eprol;
-extern int etext;
-#endif
-
-void _start(char **, void (*)(void));
-
-/* The entry function. */
-void
-_start(char **ap, void (*cleanup)(void))
-{
- int argc;
- char **argv;
- char **env;
-
- argc = *(long *)(void *)ap;
- argv = ap + 1;
- env = ap + 2 + argc;
- handle_argv(argc, argv, env);
-
- if (&_DYNAMIC != NULL) {
- atexit(cleanup);
- } else {
- process_irelocs();
- _init_tls();
- }
-
-#ifdef GCRT
- atexit(_mcleanup);
- monstartup(&eprol, &etext);
-__asm__("eprol:");
-#endif
-
- handle_static_init(argc, argv, env);
- exit(main(argc, argv, env));
-}
+#include "csu_common.h"