2 # crt0.S, part of the i960 support for the uClibc library.
4 # Copyright (C) 2002 by Okiok Data Ltd. http://www.okiok.com/
6 # This program is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU Library General Public License as published by the Free
8 # Software Foundation; either version 2 of the License, or (at your option) any
11 # This program is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
16 # You should have received a copy of the GNU Library General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
22 * The behavior in this file is tightly coupled with how the linux kernel sets things up
23 * on the stack before calling us.
25 * Currently fs/binfmt_flat.c (for STACK_GROWS_UP) and arch/i960/kernel/process.c
26 * build things so that a pointer to argc is left in g13 by start_thread().
29 * | <- sp somewhere around here, after being aligned.
35 * A complete picture of how things are set up can be seen in the comments of
36 * create_flat_tables_stack_grows_up in fs/binfmt_flat.c
38 * I believe having to use this register could probably be avoided.
48 /* We might want to add some instruction so that it crashes if main returns */
50 /* Define a symbol for the first piece of initialized data. */
56 data_start = __data_start