A virtual memory address (VMA) is where a program section must reside during execution. In microcontroller examples, “virtual” is largely historical: there is no MMU translating virtual addresses to physical ones, so the addresses are treated as the same. section 4.1.1
A section’s VMA describes its runtime location; its load memory address (LMA) describes where its contents are stored at load time.
- .text and .rodata typically execute from FLASH, with matching LMA and VMA. section 4.1.1 section 4.1.3
- .data is stored in FLASH but has a RAM VMA; startup code copies it into RAM before the program runs. section 4.1.1 section 4.1.3
- .bss is reserved in RAM and zero-initialized at startup. section 4.1.1
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 the VMA and LMA columns: .data has a RAM VMA and FLASH LMA, while .text has matching addresses. section 4.1.5

