I need to optimize the size of my executable severely (ARM development) and I noticed that in my current build scheme (gcc + ld) unuse
ARM
gcc
ld
If this thread is to be believed, you need to supply the -ffunction-sections and -fdata-sections to gcc, which will put each function and data object in its own section. Then you give and --gc-sections to GNU ld to remove the unused sections.