bloat bdscr

Bloat Bdscr May 2026

Linker script reserved a 64KB aligned block for OTA descriptor storage due to a legacy flash driver requirement.

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

Always audit your linker scripts and descriptor data structures – especially when porting code across different flash architectures or toolchains. Linker script reserved a 64KB aligned block for

bloaty -d sections firmware.elf | grep bdscr Bloat in bdscr is a subtle but impactful inefficiency in embedded and low-level software. It stems from over-alignment, static allocation, and leftover debug structures. Detecting it requires basic binary inspection tools; fixing it yields measurable gains in size, speed, and maintainability. blocks = malloc(actual_count * sizeof(bdscr_t))

.bdscr : ALIGN(4) KEEP(*(.bdscr)) > FLASH Instead of:

Example bloaty command: