|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
Information in this article applies to:
I want to use inline assembly code in a large C module. When I add a single line of assembly code and set the Generate Assembler SRC File and Assemble SRC File options for the C module, I receive the following linker error message:
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: XDATA SEGMENT: ?XD?MY_FUNCTION?MAIN LENGTH: 0018H
The inline assembly should only increase my code size by 2 bytes and shouldn't affect XDATA at all. Why do I get this error?
Your XDATA variables are not overlaying. When you use assembly source files, the linker requires at least one C source file in your project that is directly compiled into an object file to enable data overlaying. This can be an empty C source file.
The preferred way to do this is to move the functions that require inline assembly to a separate C module, then create an assembly SRC file from that. The C module that contains no inline code satifies the C module requirement and separating the inline functions into an "inline" module helps document what you've done.
Article last edited on: 2005-03-09 21:51:45
Did you find this article helpful? Yes No
How can we improve this article?