aboutsummaryrefslogtreecommitdiff
path: root/sys/rt/thunk.c
blob: 3e9fa35fe9578299ba1a78822f7fc65c6fb517f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <u.h>
#include <rt.h>

int  main();
void _init() __attribute__((weak));
void _fini() __attribute__((weak));

void rt·boot(int (*)(), int , char **, void (*)(), void (*)(), void (*)());

void
rt·thunk(intptr *stack)
{
	int argc	= stack[0];
	char **argv = (void *)(stack+1);

	rt·boot(main, argc, argv, _init, _fini, 0);
}