From 805d9be9abf1e7dd15243a6f21825ef24de6177e Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 2 Dec 2003 04:58:41 +0000 Subject: Put in a dummy reference to main so busybox will link. --- libc/sysdeps/linux/cris/crt0.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libc/sysdeps/linux/cris') 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) { -- cgit v1.2.3