Bloat Bdscr May 2026

Reduced alignment to 4 bytes, changed static array to pointer + malloc, and moved non-critical descriptors to a compressed filesystem.

gcc -DNDEBUG -ffunction-sections -fdata-sections ... ld --gc-sections -o output.elf input.o Or manually strip after linking: bloat bdscr

.bdscr : ALIGN(4) KEEP(*(.bdscr)) > FLASH Instead of: Reduced alignment to 4 bytes, changed static array

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. Reduced alignment to 4 bytes

Always audit your linker scripts and descriptor data structures – especially when porting code across different flash architectures or toolchains.

.bdscr : KEEP(*(.bdscr)) . = ALIGN(4096); // Over-alignment > FLASH With: