Keep the following points in mind when writing or customizing your own linker script:
- Ensure that the different vector sections are assigned to the appropriate memories as defined by the MicroBlaze hardware.
- Allocate space in the
.bsssection for stack and heap. Set the
_stackvariable to the location after
_STACK_SIZElocations of this area, and the
_heap_startvariable to the next location after the
_STACK_SIZElocation. Because the stack and heap need not be initialized for hardware as well as simulation, define the
_bss_endvariable after the
.bsssection boundary does not include either stack or heap.
- Ensure that the variables
_sbss_endare defined to the beginning and end of the sections
- ANSI C requires that all uninitialized memory be initialized to startup (not
required for stack and heap). The standard CRT that is provided assumes a single
.bsssection that is initialized to zero. If there are multiple
.bsssections, this CRT will not work. You should write your own CRT that initializes all the