LibC: Tell compiler about invisible call to _start

I'm not sure how else to handle this. Curiously, I can't find the string '_start'
anywhere else in the project. Could it be that we haven't NIH'd this yet?
And that we actually rely on magic from the compiler to call _start for us?
This commit is contained in:
Ben Wiederhake 2020-08-12 00:07:34 +02:00 committed by Andreas Kling
parent b493c6cd39
commit 9221a25bbc
Notes: sideshowbarker 2024-07-19 03:41:39 +09:00

View file

@ -38,6 +38,9 @@ extern void _init();
extern char** environ;
extern bool __environ_is_malloced;
// Tell the compiler that this may be called from somewhere else.
int _start(int argc, char** argv, char** env);
int _start(int argc, char** argv, char** env)
{
environ = env;