1 /* vi: set sw=4 ts=4: */
2 /* uClibc/sysdeps/linux/m68k/crt0.S
3 * Pull stuff off the stack and get uClibc moving.
5 * Copyright (C) 2002-2003, George Thanos <george.thanos@gdt.gr>
6 * Yannis Mitsos <yannis.mitsos@gdt.gr>
8 * Copyright (C) 2000,2001 by Erik Andersen <andersen@uclibc.org>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Library General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
20 * You should have received a copy of the GNU Library General Public License
21 * along with this program; see the file COPYING.LIB. If not, see
22 * <http://www.gnu.org/licenses/>.
25 /* Stick in a dummy reference to main(), so that if an application
26 * is linking when the main() function is in a static library (.a)
27 * we can be sure that main() actually gets linked in */
28 extern void main(int argc,void *argv,void *envp);
29 /* void (*mainp)(int argc,void *argv,void *envp) = main; */
31 void __uClibc_main(int argc,void *argv,void *envp);
33 void _uClibc_start(unsigned int first_arg)
39 stack = (unsigned long*) first_arg;
41 argv = (char **)(stack + 1);
42 envp = (char **)(stack + 1 + argc + 1);
44 __uClibc_main(argc, argv, envp);