1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     init_StartUp.cpp
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 23869 $
14  *---------------------------------------------------------------------------*/
15 
16 //---------------------------------------------------------------------------
17 
18 #include <nn/config.h>
19 #include <nn/init.h>
20 #include <nn/os/os_Initialize.h>
21 
22 #define NN_SYSTEM_DEFAULT_HEAP_SIZE     0x00800000
23 
24 extern "C" nninitStaticInitFunc Image$$STATIC_INIT$$RO$$Base[];
25 extern "C" nninitStaticInitFunc Image$$STATIC_INIT$$RO$$Limit[];
26 
nninitSystem(void)27 extern "C" NN_WEAK_SYMBOL void nninitSystem(void)
28 {
29     // OS ライブラリの初期化
30     nn::os::Initialize();
31 }
32 
nninitStartUp(void)33 extern "C" NN_WEAK_SYMBOL void nninitStartUp(void)
34 {
35     nninitStartUpDefault();
36 }
37 
nninitCallStaticInitializers(void)38 extern "C" void nninitCallStaticInitializers(void)
39 {
40     for( nninitStaticInitFunc* f = Image$$STATIC_INIT$$RO$$Base;
41          f < Image$$STATIC_INIT$$RO$$Limit;
42          ++f )
43     {
44         (*f)();
45     }
46 }
47 
nninitSetup(void)48 extern "C" NN_WEAK_SYMBOL void nninitSetup(void)
49 {
50     nninitSetupDefault();
51 }
52 
53