
Originally Posted by
gri
With the msvc compiler you can also enable function level linking and remove unused symbols/functions from the code.
Compiler flags + "/Gy"
Linker flags + "/OPT:ICF /OPT:REF"
If not already done

The same can be done while using gcc by passing the options
-fdata-sections -ffunction-sections -Wl,--gc-sections
-fdata-sections -ffunction-sections -Wl,--gc-sections
To copy to clipboard, switch view to plain text mode
The last one is actually an option --gc-sections to the linker ld, but gcc passes that on when we prefix it by -Wl,
Bookmarks