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. |
||
---|---|---|
.. | ||
drivers | ||
init | ||
bootstrap_quarkX1000.S | ||
helpers.h | ||
helpers.S | ||
Makefile.x86_common | ||
Makefile.x86_quarkX1000 | ||
quarkX1000.ld |