summaryrefslogtreecommitdiff
path: root/sysdeps/stub/start.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
committerRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
commit28f540f45bbacd939bfd07f213bcad2bf730b1bf (patch)
tree15f07c4c43d635959c6afee96bde71fb1b3614ee /sysdeps/stub/start.c
initial import
Diffstat (limited to 'sysdeps/stub/start.c')
-rw-r--r--sysdeps/stub/start.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/stub/start.c b/sysdeps/stub/start.c
new file mode 100644
index 0000000000..b8bb04bbb4
--- /dev/null
+++ b/sysdeps/stub/start.c
@@ -0,0 +1,16 @@
+/* This file should define the low-level program entry point,
+ which should set up `__environ', and then do:
+ __libc_init(argc, argv, __environ);
+ exit(main(argc, argv, __environ));
+
+ This file should be prepared to be the first thing in the text section (on
+ Unix systems), or otherwise appropriately special. */
+
+volatile int errno;
+
+#ifndef HAVE_GNU_LD
+#undef environ
+#define __environ environ
+#endif
+
+char **__environ;