Thomas WEISSSCHUH presented at kernel recipe 2025 #nolibc a minimalist #libc included in kernel. Headers files are in the kernel source tree and it grown a lot since linux-5.1 initial version, but not installed in system (at least on Arch Linux).

Example given during the conference:
__
hello.c:
#include <stdio.h>

int main(void)
{
printf("Hello World!\n");

return 0;
}
To compile it (you can notice relative path for includes here, I stll have to add `-I/usr/include as last -I` (include path) to have it working (from root of Linux source tree):
cc -nostdinc -nostdlib -static -Iusr/include -Itools/include/nolibc/ -I/usr/include hello.c -o hello
./hello
Hello World!
Making sure you're not a bot!

Primer artículo para #ROOR08. Richi nos destripa todos los secretos de #noLibC que se distribuye con el kernel y nos permite #programar sin dependencias en lenguaje #C

#programming #Linux

https://ibolcode.net/roor/2024-08-programas-sin-dependencias-con-nolibc

Programas sin dependencias con NoLibC

Ya sabéis lo que nos gusta hacer que nuestros programas ocupen poco y sean independientes. Para ello suele ser necesario deshacerse de la librería C estándar y sustituirla por una versión más ligera como ulibc, dietlibc o musl… Otra alternativa es NoLibC.</p>

{ROOR} Revista On-line Occam's Razor