I\'m deploying a small program compiled with gcc, 4.3.2-1.1 (Debian). This program will be deployed on virtual machine templates ranging from Debain 5 to bleeding edge Fedor
This issue is related not only to gcc, but to ld(1) too.
By default, gcc doesn't eliminate dead code, you can check this by compiling/linking executable, and then running
objdump -d a.out
which shows you all functions in your executable.
Simple "googling" give this link.
So, to remove unused functions, you need: