diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-24 06:38:09 -0700 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2019-07-05 14:47:21 +0200 |
commit | 721f0983ea98376644a22df578740b6489a4e49a (patch) | |
tree | f99d5eed854d7837822dc58660f0d0c968546e01 /libc/sysdeps/linux | |
parent | ed495bf14d60373c13357e0783ffd3b96e076360 (diff) |
riscv: clear a3/a4 in crt1
We don't support shared libraries and thus _init/_fini. But loading
nommu binaries blows they aren't cleared, so do that.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r-- | libc/sysdeps/linux/riscv64/crt1.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/riscv64/crt1.S b/libc/sysdeps/linux/riscv64/crt1.S index 872e0b12e..1e8403d26 100644 --- a/libc/sysdeps/linux/riscv64/crt1.S +++ b/libc/sysdeps/linux/riscv64/crt1.S @@ -52,6 +52,11 @@ _start: la a0, main REG_L a1, 0(sp) /* argc. */ addi a2, sp, SZREG /* argv. */ + /* + * No support fo app_init/app_fini as we don't support shared libraries. + */ + mv a3, zero + mv a4, zero andi sp, sp, ALMASK /* Align stack. */ mv a6, sp /* stack_end. */ |