摘自: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Beihhaag.html
文档: ARM Compiler toolchain Developing Software for ARM Processors.pdf
就不翻译了, 水平有限, 费时间, 免得误人子弟. 见谅则个! ^_^
====================================================================================
In an image where you have not described the memory map, the linker places code and data according to a default memory map, as shown in the following figure:
Note
The processors based on ARMv6-M and ARMv7-M architectures have fixed memory maps. This makes porting software easier between different systems based on these processors.
The default memory map is described as follows:
-
The image is linked to load and run at address
0x8000
. All Read Only (RO) sections are placed first, followed by Read-Write(RW) sections, then Zero Initialized (ZI) sections. -
The heap follows directly on from the top of ZI, so the exact location is decided at link time.
-
The stack base location is provided by a semihosting operation during application startup. The value returned by this semihosting operation depends on the debug environment.
The linker observes a set of rules to decide where in memory code and data is located:

Generally, the linker sorts the input sections by attribute, by name, and then by position in the input list.
To fully control the placement of code and data you must use the scatter-loading mechanism.