ARM Technical Support Knowledge Articles

ERROR L107 (ADDRESS SPACE OVERFLOW) WITH INLINE ASM

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

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?

ANSWER

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.

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-03-09 21:51:45

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential