I need to optimize the size of my executable severely (ARM
development) and
I noticed that in my current build scheme (gcc
+ ld
) unuse
While not strictly about symbols, if going for size - always compile with -Os
and -s
flags. -Os
optimizes the resulting code for minimum executable size and -s
removes the symbol table and relocation information from the executable.
Sometimes - if small size is desired - playing around with different optimization flags may - or may not - have significance. For example toggling -ffast-math
and/or -fomit-frame-pointer
may at times save you even dozens of bytes.