From 9221a25bbc6048f8e63d8c5b40d2cb90e08d0a4a Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Wed, 12 Aug 2020 00:07:34 +0200 Subject: [PATCH] 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? --- Libraries/LibC/crt0.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/LibC/crt0.cpp b/Libraries/LibC/crt0.cpp index 8f60ac6c4e..60a96cb066 100644 --- a/Libraries/LibC/crt0.cpp +++ b/Libraries/LibC/crt0.cpp @@ -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;