4 ms·
You can do better than working at the object file level. With --gc-sections and --ffunction-sections, the linker can include only the relevant functions into yo
by rcxdude 2y ago
You can do better than working at the object file level. With --gc-sections and --ffunction-sections, the linker can include only the relevant functions into your binary (whether your libc tries to minimise internal dependencies is another question)
- Neywiny 2y agoI think even better than functions it can optimize out data sections too. For example if I declare a huge array and don't use it, it doesn't show up in the binary. Not always true but the are times it is.