We are faced with an interesting topic. Suppose we have a special-functions.c file, basically a library. We need to optimize the code by getting rid of all unused / unaccounted functions during the build process on the fly. I'm not looking for unused (dead) code at all: some parts will be βdeadβ if compiled to one of the architectures, but they will be used in another architecture assembly.
Does anyone know flags, tools, methods, and tricks? The compiler is a standard gcc with the code ansi 99 C.
EDIT I ββknow this is basically part of the linker, but using gcc the process is not split into two parts.
source share