]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/nolibc: add support for program_invocation_{,short_}name
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 18 Mar 2026 15:50:16 +0000 (16:50 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Sun, 22 Mar 2026 09:40:30 +0000 (10:40 +0100)
commitb74be922745989573eedee2a91d987711ef968bd
tree1df7c8d21df1bf7b680ee6d3637c034128cb970d
parent5662ec000d97d7a84ad4e3f34768ef08c869d0e3
tools/nolibc: add support for program_invocation_{,short_}name

Add support for the GNU extensions 'program_invocation_name' and
'program_invocation_short_name'. These are useful to print error
messages, which by convention include the program name.

As these are global variables which take up memory even if not used,
similar to 'errno', gate them behind NOLIBC_IGNORE_ERRNO.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260318-nolibc-err-h-v4-1-08247a694bd9@weissschuh.net
tools/include/nolibc/crt.h
tools/include/nolibc/errno.h
tools/testing/selftests/nolibc/nolibc-test.c