1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00
serenity/LibC/entry.cpp
Andreas Kling 260b14e505 Implement errno in LibC.
This also meant I had to implement BSS (SHT_NOBITS) sections in ELFLoader.
I also added an strerror() so we can print out what the errors are.
2018-10-25 12:06:50 +02:00

18 lines
297 B
C++

#include <Kernel/Syscall.h>
extern "C" int main(int, char**);
int errno;
extern "C" int _start()
{
errno = 0;
// FIXME: Pass appropriate argc/argv.
int status = main(0, nullptr);
Syscall::invoke(Syscall::PosixExit, status);
// Birger's birthday <3
return 20150614;
}