gcc can do link-time tree shaking if objects are compiled with -ffunction-sections -fdata-sections and linked with -Wl,--gc-sections
gcc can do link-time tree shaking if objects are compiled with -ffunction-sections -fdata-sections and linked with -Wl,--gc-sections