Hello world in C++ is 1.3 MiB when linked statically.
$ cat helloworld.cpp
#include <iostream>
int main() {
std::cout << "Hello world" << std::endl;
}
$ g++ -std=c++14 -Os -static helloworld.cpp
$ size a.out
text data bss dec hex filename
1294232 29692 92936 1416860 159e9c a.out
The majority of this is bloat from GNU libc though, using diet libc would yield better results $ cat helloworld.c
#include <stdio.h>
int main() {
puts ("Hello world");
}
$ gcc -std=c99 -Os -static helloworld.c
$ size a.out
text data bss dec hex filename
725706 7572 9080 742358 b53d6 a.out