Every loadable or allocatable output section has two addresses. The first is the VMA, or
virtual memory address. This is the address the section will have when the output file is
run. The second is the LMA, or load memory address. This is the address at which the
section will be loaded. In most cases the two addresses will be the same. An example of
when they might be different is when a data section is loaded into ROM, and then copied
into RAM when the program starts up (this technique is often used to initialize global
variables in a ROM based system). In this case the ROM address would be the LMA, and
the RAM address would be the VMA.
link script-difference between VMA and LMA
最新推荐文章于 2020-06-05 14:36:20 发布