The functions in
stdio.h have implementations in
libc.a for static linking), which is linked into your executable by default (as if
-lc were specified). GCC can be instructed to avoid this automatic link with the -nostdlib or -nodefaultlibs options.
The math functions in
math.h have implementations in
libm.a for static linking), and
libm is not linked in by default. There are historical reasons for this
libc split, none of them very convincing.
Interestingly, the C++ runtime
libm, so if you compile a C++ program with GCC (
g++), you will automatically get
libm linked in.