summaryrefslogtreecommitdiff
path: root/service/kjarna.c
blob: b47a45c4e5a029d1566c61fa6de91450103699f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <kjarna/interface.h>
#include <unistd.h>

struct kjarna_entry_params *entry_params;

extern int main(int argc, char **argv);

int kjarna_entry()
{
	uint64_t image_base;
	__asm__ ("leaq kc_image_base(%%rip), %0" : "=r"(image_base) :: );

	bool wait = false;
	while(wait);

	int result = main(0, nullptr);
	_exit(result);
}