2 * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
4 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
11 #ifndef __UCLIBC_CTOR_DTOR__
16 /* Stick in a dummy reference to main(), so that if an application
17 * is linking when the main() function is in a static library (.a)
18 * we can be sure that main() actually gets linked in
24 /* When we enter this piece of code, the program stack looks like this:
25 argc argument counter (integer)
26 argv[0] program name (pointer)
27 argv[1...N] program args (pointers)
28 argv[argc-1] end of args (integer)
30 env[0...N] environment variables (pointers)
37 .type __start,@function
42 mov_s r5, r0 ; rltd_fini
43 add_s r2, sp, 4 ; argv
52 /* __uClibc_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
55 /* Should never get here.... */
57 .size __start,.-__start