mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
6b433aede1
This patch adds -ffunction-sections and -fdata-sections to the 'release' CFLAGS so each function and data is place into its own section in the output file. It also adds --gc-section to the 'release' LDFLAGS so the linker removes the sections which are not referenced. This patch also adds -ffunction-sections and -fdata-sections options to CFLAGS from build_newlib.sh. This increases newlib static libraries size, however, the Contiki image shrinks even more since --gc-section removes "dead code" from newlib. As a practical effect, all unused function and data (as well as sections such as .eh_frame) are striped out from the final elf binary. This shrinks our release binary drastically. Finally, to prevent --gc-section from removing .multiboot section, this patch adds KEEP(*(.multiboot)) to quarkX1000.ld. |
||
---|---|---|
.. | ||
6502 | ||
arm | ||
avr | ||
cc26xx-cc13xx | ||
cc253x | ||
cc2430 | ||
cc2538 | ||
mc1322x | ||
msp430 | ||
native | ||
pic32 | ||
rl78 | ||
stm32w108 | ||
x86 |