Bdscr [new] | Bloat

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

bdscr_t *blocks; blocks = malloc(actual_count * sizeof(bdscr_t)); In release builds: bloat bdscr

Example bloaty command:

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, changed static array

gcc -DNDEBUG -ffunction-sections -fdata-sections ... ld --gc-sections -o output.elf input.o Or manually strip after linking: Reduced alignment to 4 bytes