Skip to content

Commit 2ef91b7

Browse files
authored
Merge pull request #649 from fjtrujy/crt0InitSys
Call `_InitSys()` before newlib initialization
2 parents a5cd227 + 015b0b2 commit 2ef91b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ee/startup/src/crt0.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ static void _main()
9797
// NOTE: this call can restart the application
9898
if (_ps2sdk_memory_init)
9999
_ps2sdk_memory_init();
100+
101+
// Initialize the kernel (Apply necessary patches).
102+
_InitSys();
100103

101104
// Use arguments sent through start if sent (by ps2link for instance)
102105
pa = &args;
@@ -109,16 +112,13 @@ static void _main()
109112
// initialize libcglue
110113
_libcglue_init();
111114

115+
// Enable interruts
116+
EI();
117+
112118
// call global constructors (weak)
113119
if (_init)
114120
_init();
115121

116-
// Initialize the kernel (Apply necessary patches).
117-
_InitSys();
118-
119-
// Enable interruts
120-
EI();
121-
122122
// call main
123123
retval = main(pa->argc, pa->argv);
124124

0 commit comments

Comments
 (0)