tools/nolibc: mips: add support for PIC
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 8 Nov 2023 18:14:43 +0000 (19:14 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:30 +0000 (22:38 +0100)
commit544102458a8d1c33f9f5f99f9bda8e2b858bcb10
tree5e821833ba97448624f312e81592249cbd29b060
parent8bcf9a485541fe0079483162496db1add932689b
tools/nolibc: mips: add support for PIC

MIPS requires some extra instructions to set up the $gp register for the
with a pointer to the global data area.

This isn't needed for non-PIC builds, but this patch enables the code
unconditionally to prevent bitrot.

Also enable PIC in one of the test configurations for ongoing
validation.

Link: https://lore.kernel.org/r/20231108-nolibc-pic-v2-1-4fb0d6284757@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-mips.h
tools/testing/selftests/nolibc/Makefile