11.1.5 Computing Absolute Addresses
After the special sections have been created, the final sizes of all output sections are known. The linker then computes absolute addresses for all output sections and external symbols. Each output section is checked to make sure it falls within its assigned memory regions. If any section falls outside of its memory region, an error is generated. Any symbols defined in the linker script are also computed.
Boundaries of the stack and heap are calculated, based on the extent of unused data memory. If insufficient memory is available, an error is generated. For more information about the stack and heap, see Stack Allocation and Heap Allocation.