Bloat: Bdscr
.bdscr : KEEP(*(.bdscr)) . = ALIGN(4096); // Over-alignment > FLASH With:
objcopy --remove-section=.bdscr firmware.elf stripped.elf Scenario: A Zigbee IoT hub firmware had a .bdscr section of 64KB, but only 2KB was actually used. bloat bdscr
5.1. Linker Script Optimization Replace: .bdscr : KEEP(*(.bdscr)) . = ALIGN(4096)
bdscr_t blocks[256]; // 256 * 32 bytes = 8KB Use: // Over-alignment >