diff options
author | dzwdz | 2022-07-26 22:40:28 +0200 |
---|---|---|
committer | dzwdz | 2022-07-26 22:40:28 +0200 |
commit | 4aee2f759ab7bf2ad9534941afef0195040ba5db (patch) | |
tree | 8799d4dac4bd82cc2274e4a8246e6891356b1511 /src/user/bootstrap | |
parent | d54dcb2efc4be344900a7721ac4b65b47840c5d2 (diff) |
user/libc: a _start that automatically selfrelocates PIEs
Diffstat (limited to 'src/user/bootstrap')
-rw-r--r-- | src/user/bootstrap/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/bootstrap/main.c b/src/user/bootstrap/main.c index fecd38f..089fd68 100644 --- a/src/user/bootstrap/main.c +++ b/src/user/bootstrap/main.c @@ -11,7 +11,7 @@ extern char _bss_end; extern char _initrd; __attribute__((section(".text.startup"))) -int main(void) { +void _start(void) { _syscall_memflag(&_bss_start, &_bss_end - &_bss_start, MEMFLAG_PRESENT); /* move everything provided by the kernel to /kdev */ @@ -34,3 +34,5 @@ int main(void) { } _syscall_exit(1); } + +int main(void) {return 0;} // dummy, needed to link |