1/** 2 * \file 3 * \brief libc startup code. 4 */ 5 6/* 7 * Copyright (c) 2007, 2008, 2010, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#include <barrelfish/dispatch.h> 16#include <asmoffsets.h> 17 18 .text 19 .globl _start, _start_init 20 21_start: 22 mov $0, %rsi 23 24_start_generic: // Assumption: rdi = dispatcher 25 // Initialize stack for setup code 26 movq %rdi, %rsp 27 addq $(OFFSETOF_DISP_PRIV_STACK_LIMIT), %rsp 28 subq $8, %rsp // align the stack 29 // Call barrelfish_init_disabled (doesn't return) 30 jmp barrelfish_init_disabled 31 32/* special entry point for init domain */ 33_start_init: 34 mov $1, %rsi 35 jmp _start_generic 36