diff mbox series

[uclibc-ng-devel] riscv: clear a3/a4 in crt1

Message ID 20190624133809.GB18527@infradead.org
State Accepted
Headers show
Series [uclibc-ng-devel] riscv: clear a3/a4 in crt1 | expand

Commit Message

Christoph Hellwig June 24, 2019, 1:38 p.m. UTC
From: Christoph Hellwig <hch@lst.de>

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>
---
 libc/sysdeps/linux/riscv64/crt1.S | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

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.  */