tools/nolibc: add auxiliary vector retrieval for riscv
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Jan 2023 07:24:29 +0000 (08:24 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 10 Jan 2023 21:33:56 +0000 (13:33 -0800)
commit041fa97cb332e59311aa861fac3be178abad6a9b
tree11182e834e02832cedc133c4098826db41e6e74b
parent59ea1876242163da431026921070282b2d651197
tools/nolibc: add auxiliary vector retrieval for riscv

In the _start block we now iterate over envp to find the auxiliary
vector after the NULL. The pointer is saved into an _auxv variable
that is marked as weak so that it's accessible from multiple units.
It was tested on riscv64 only.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/arch-riscv.h