From 9438c2fdaf4e75c9218a5fde84f121a7a0abb457 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 9 Aug 2022 18:29:25 +0200 Subject: user/libc: preserve cwd through exec() --- src/user/lib/crt0.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/user/lib/crt0.s') diff --git a/src/user/lib/crt0.s b/src/user/lib/crt0.s index dd9ab1b..3548264 100644 --- a/src/user/lib/crt0.s +++ b/src/user/lib/crt0.s @@ -8,7 +8,10 @@ _start: call elf_selfreloc mov %rbp, %rsp - /* pushed by _freejmp */ + + pop %rdi + call __setinitialcwd + pop %rdi pop %rsi pop %rdx -- cgit v1.2.3