summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/crt0.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-12-02 04:58:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-12-02 04:58:41 +0000
commit805d9be9abf1e7dd15243a6f21825ef24de6177e (patch)
treed8b2f90209f85f97537ce138583fddb23d872755 /libc/sysdeps/linux/cris/crt0.c
parent0d898a4d611455314d36ed62e059c5dafbafb484 (diff)
Put in a dummy reference to main so busybox will link.
Diffstat (limited to 'libc/sysdeps/linux/cris/crt0.c')
-rw-r--r--libc/sysdeps/linux/cris/crt0.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/cris/crt0.c b/libc/sysdeps/linux/cris/crt0.c
index 668ded1f8..166d30b60 100644
--- a/libc/sysdeps/linux/cris/crt0.c
+++ b/libc/sysdeps/linux/cris/crt0.c
@@ -35,6 +35,12 @@ extern void __uClibc_start_main(int argc, char **argv, char **envp,
extern void weak_function _init(void);
extern void weak_function _fini(void);
+/* Stick in a dummy reference to main(), so that if an application
+ * is linking when the main() function is in a static library (.a)
+ * we can be sure that main() actually gets linked in */
+extern void main(int argc,void *argv,void *envp);
+void (*__mainp)(int argc,void *argv,void *envp) = main;
+
static void
start1 (int argc, char **argv)
{