Alex079 / vscode-avr-helper

Helper extension to simplify code compilation and flashing for AVR chips
MIT License
12 stars 1 forks source link

Options "-ffunction-sections", "-fdata-sections" are for compiler, not linker #48

Closed leonty closed 3 months ago

leonty commented 3 months ago

The options "-ffunction-sections", "-fdata-sections" should be used in compiler calls, not linker. https://gcc.gnu.org/onlinedocs/gnat_ugn/Compilation-options.html

The linker needs "-Wl,-gc-sections" instead to perform dead code elimination.

Alex079 commented 3 months ago

Thanks for the hint! I will check this week. I guess only default values need to be changed.