1/*
2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 *               Alexander Warg <warg@os.inf.tu-dresden.de>,
4 *               Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
5 *     economic rights: Technische Universität Dresden (Germany)
6 *
7 * This file is part of TUD:OS and distributed under the terms of the
8 * GNU General Public License 2.
9 * Please see the COPYING-GPL-2 file for details.
10 */
11#define __ASSEMBLY__
12#include <l4/sys/compiler.h>
13
14	.section .text.init
15
16ENTRY(__crt_dummy__)
17ENTRY(_start)
18ENTRY(start)
19
20	test	%rdi, %rdi
21	jne	1f
22	pop	%rdi		/* ptr to kernel info page is on init stack */
231:
24	lea	_stack,%rsp	/* reset stack */
25	push	$_exit
26	jmp	init
27
28ENTRY(__main)
29	ret
30
31	.bss
32
33	.space	4096
34ENTRY(_stack)
35