Meaning
Reviewing the memory layout of a compiled binary allows developers to optimize flash and ram usage. Linker symbol map analysis provides a detailed account of where each function and variable resides in the physical memory space. This data is extracted from a map file generated by the toolchain during the final stage of the build process.
Memory Allocation
Symbols are assigned to specific sections like code, initialized data, or zero-initialized data based on their attributes. Linker symbol map analysis shows if a specific library is consuming more space than expected. This allows the team to target specific areas for code size reduction.
Symbol Location
Addresses of variables are checked to ensure they do not overlap or sit in restricted memory regions. In linker symbol map analysis, an engineer can verify that the stack and heap are correctly placed to avoid collisions. Any symbol that is unexpectedly large or misplaced is flagged for investigation.
Flash Optimization
Optimization efforts use these maps to identify unused functions that were not stripped by the linker. By removing dead code, the binary size is kept within the limits of the hardware. The map provides the final word on the contents of the firmware image.