liveBook · Manning

Load memory address

As explained in Embedded Software with Rust

A load memory address (LMA) is the address where a program section's contents are stored in the loadable image.

A load memory address (LMA) is where a section is stored in the loadable image, typically in FLASH. Its virtual memory address (VMA) is where it resides during execution; on microcontrollers, these addresses are not translated by an MMU. section 4.1.1

LMA and VMA determine how sections reach their runtime locations:

Idx Name         Size     VMA        LMA        File off  Algn
  0 .vector_table 00000040 08000000  08000000   00010000  2**2
  1 .text         00001a00 08000040  08000040   00010040  2**2
  2 .rodata       00000200 08001a40  08001a40   00011a40  2**2
  3 .data         00000100 20000000  08001c40   00014000  2**2
  4 .bss          00000080 20000100  20000100   00014100  2**2

Compare each section’s LMA and VMA: the .data row shows a FLASH load address and a RAM execution address. section 4.1.5

How Embedded Software with Rust covers it

How deep it goes
Traces section placement through startup copying and zeroing, linker mapping, and memory-layout inspection.
Examples
Uses .text, .rodata, .data, and .bss placements, plus a section-layout listing with differing .data addresses.
What it assumes
Introduces LMA and VMA in a microcontroller context without relying on MMU-based address translation.
What you can do after
Diagnose section placement by inspecting cargo objdump output and comparing LMA with VMA.
How it connects
Connects LMA to VMA, linker scripts, startup code, and data-section relocation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.