1 /* Startup code for SH5 & ELF.
2 Copyright (C) 1999 Free Software Foundation, Inc.
3 Copyright (C) 2001 Hewlett-Packard Australia
5 This file is part of the GNU C Library.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with the GNU C Library; see the file COPYING.LIB. If not,
19 see <http://www.gnu.org/licenses/>. */
21 /* This is the canonical entry point, usually the first thing in the text
24 At this entry point, most registers' values are unspecified, except:
26 sp The stack contains the arguments and environment:
31 (4*(argc+1))(sp) envp[0]
39 .type _start,%function
43 .align 2 /* 2^2 = 4 */
46 /* __uClibc_main (main, argc, argv, init, fini) */
50 /* Pop argc off the stack and save a pointer to argv */
51 ld.l r15, 0, r3 /* argc */
52 addi r15, 4, r4 /* argv */
58 movi __uClibc_main, r17
62 /* should never get here....*/
65 blink tr0, r63 /* call abort() => (r63) do not come back ... */
68 * The following is a stub to stop the GNU toolchain
69 * from calling its C-RTL initialization routines.
76 /* Define a symbol for the first piece of initialized data. */
82 data_start = __data_start