]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/nolibc: add option to disable runtime
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 24 Sep 2025 14:20:54 +0000 (16:20 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 29 Oct 2025 15:29:16 +0000 (16:29 +0100)
commit3d66c4e14fbf4d59ca4665391d133655fa668042
treece6859fde99095c2d4214b6e8e93dfdff1447d93
parent2cb6cc8361da803ede847ed1ca8afeb3af6df6ff
tools/nolibc: add option to disable runtime

In principle, it is possible to use nolibc for only some object files in
a program. In that case, the startup code in _start and _start_c is not
going to be used. Add the NOLIBC_NO_RUNTIME compile time option to
disable it entirely and also remove anything that depends on it.

Doing this avoids warnings from modpost for UML as the _start_c code
references the main function from the .init.text section while it is not
inside .init itself.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
16 files changed:
tools/include/nolibc/arch-arm.h
tools/include/nolibc/arch-arm64.h
tools/include/nolibc/arch-loongarch.h
tools/include/nolibc/arch-m68k.h
tools/include/nolibc/arch-mips.h
tools/include/nolibc/arch-powerpc.h
tools/include/nolibc/arch-riscv.h
tools/include/nolibc/arch-s390.h
tools/include/nolibc/arch-sh.h
tools/include/nolibc/arch-sparc.h
tools/include/nolibc/arch-x86.h
tools/include/nolibc/crt.h
tools/include/nolibc/stackprotector.h
tools/include/nolibc/stdlib.h
tools/include/nolibc/sys.h
tools/include/nolibc/sys/auxv.h