|
|||||||||||
|
Technical Support Support Resources
Product Information |
BL51: Error L107 (Address Space Overflow) for ?STACKInformation in this article applies to:
SYMPTOMSI've created a program that has an absolute IDATA variable located at 0xFE in internal memory.
My program compiles OK, but when I link it, I receive the following linker error messages:
What's wrong with my program? CAUSEBy default, the linker locates IDATA segments starting with the segments other than the ?STACK segment. When you declare IDATA variables, you typically want them to be located in memory at lower addresses than the stack (since the stack grows up). The linker tries to locate IDATA segments this way for you. Since your IDATA variable (xxx) is located at 0xFE-0xFF, there is no space after it for the stack and the linker emits the errors you received. This is shown in the map file:
Note that there is no stack located in the IDATA memory area. RESOLUTIONTo solve this problem, you must manually specify the order in which the IDATA segments (like ?STACK) are located. In you example, you may specify the ?STACK segment in the IDATA linker command. For example:
This instructs the linker allocate memory for the IDATA segments starting with the ?STACK segment. If you have other IDATA segments that should be located before ?STACK, you may specify them as follows:
The following map file shows the result of this linker directive:
Note that the ?STACK directive is located in the first available space in the IDATA memory and that the xxx variable (which is an absolute segment) is located at 0xFE. MORE INFORMATION
SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.