Using GCC --gc-sections to eliminate unused code and data

These two commits enable --gc-sections in the GNU toolchain when building the firmware binaries, and then provide behaviour for the assembler source code that is equivalent to the -ffunction-sections directive to the C compiler.

I've kept the commits separate at the moment so it easy to see the action of the --gc-sections enabling changes before the substantial changes needed for the assembler code patch.