2018-10-22 15:06:22 +03:00
|
|
|
#include <Kernel/Syscall.h>
|
2018-10-28 11:36:21 +03:00
|
|
|
#include <AK/StringImpl.h>
|
2018-10-22 15:06:22 +03:00
|
|
|
|
|
|
|
extern "C" int main(int, char**);
|
|
|
|
|
2018-10-25 13:06:00 +03:00
|
|
|
int errno;
|
|
|
|
|
2018-10-22 15:13:17 +03:00
|
|
|
extern "C" int _start()
|
2018-10-22 15:06:22 +03:00
|
|
|
{
|
2018-10-25 13:06:00 +03:00
|
|
|
errno = 0;
|
|
|
|
|
2018-10-28 11:36:21 +03:00
|
|
|
StringImpl::initializeGlobals();
|
|
|
|
|
2018-10-26 12:16:56 +03:00
|
|
|
int argc;
|
|
|
|
char** argv;
|
|
|
|
int rc = Syscall::invoke(Syscall::GetArguments, (dword)&argc, (dword)&argv);
|
|
|
|
int status = 254;
|
|
|
|
if (rc == 0)
|
|
|
|
status = main(argc, argv);
|
2018-10-22 16:42:39 +03:00
|
|
|
Syscall::invoke(Syscall::PosixExit, status);
|
2018-10-22 15:06:22 +03:00
|
|
|
|
|
|
|
// Birger's birthday <3
|
|
|
|
return 20150614;
|
|
|
|
}
|