]> www.infradead.org Git - users/dwmw2/linux.git/commit
tools/nolibc: mips: load current function to $t9
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 7 Aug 2024 21:51:38 +0000 (23:51 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Sat, 10 Aug 2024 15:08:10 +0000 (17:08 +0200)
commit0daf8c86a45163f35b8d4f7795068c2511dd0ad9
treefae8d956a77e757ed32be1db9c5d1653ef5a5afe
parent55850eb4e582f0696f40b8315ac31a45d6a4955e
tools/nolibc: mips: load current function to $t9

The MIPS calling convention requires the address of the current function
to be available in $t9.
This was not done so far.

For GCC this seems to have worked, but when compiled with clang the
executable segfault instantly.
Properly load the address of _start_c() into $t9 before calling it.

Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-2-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-mips.h