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/app/init | |
parent | d54dcb2efc4be344900a7721ac4b65b47840c5d2 (diff) |
user/libc: a _start that automatically selfrelocates PIEs
Diffstat (limited to 'src/user/app/init')
-rw-r--r-- | src/user/app/init/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/user/app/init/main.c b/src/user/app/init/main.c index 426933f..788fd78 100644 --- a/src/user/app/init/main.c +++ b/src/user/app/init/main.c @@ -11,10 +11,7 @@ __attribute__((visibility("hidden"))) extern char _image_base[]; -__attribute__((section(".text.startup"))) int main(void) { - elf_selfreloc(); - freopen("/kdev/com1", "a+", stdout); printf("in init (stage 2), loaded at 0x%x\n", &_image_base); @@ -73,5 +70,5 @@ int main(void) { _syscall_await(); printf("init: quitting\n"); - exit(0); + return 0; } |