section [address] [(type)] :
[AT(lma)]
[ALIGN(section_align) | ALIGN_WITH_INPUT]
[SUBALIGN(subsection_align)]
[constraint]
{
output-section-command
output-section-command
…
} [>region] [AT>lma_region] [:phdr :phdr …] [=fillexp]
region:
specifies the virtual memory address (VMA) of the section,
lma_region:
pecifies the load memory address (LMA).
The VMA is the address the section will have
when the program is run.
The LMA is the address of the section when program is being 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.
referenced:
https://sourceware.org/binutils/docs/ld/Basic-Script-Concepts.html
文章来源地址https://www.toymoban.com/news/detail-670525.html
文章来源:https://www.toymoban.com/news/detail-670525.html
到了这里,关于What does > region1 AT > region2 mean in an LD linker script的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!