ARM Technical Support Knowledge Articles

WARNING 4 (DATA SPACE MEMORY OVERLAP)

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

When I link my code I get this warning message. How do I fix it?

*** WARNING L4: DATA SPACE MEMORY OVERLAP
FROM:    0004H
TO:      0007H

ANSWER

This is caused by the linker attempting to locate more than one data segment at the range of addresses specified in the warning. In the particular case given above, those addresses are usually occupied by Register Bank 0.

Check the map file generated by the linker (extension .m51) and towards the start of the file you will see a table called 'Link Map of Module'. This is the memory map of your project.

Look in the Data Memory section at the segments located around 0000H to 0007H. You can figure out from the segment names what is being located there. For example:

?DT?FOO

is a segment that contains the data variables from the file foo.c.

One of the segments must be relocated to avoid the overlap. If you have any variables that you are absolutely locating with the _at_ keyword (in C) or the DSEG directive (in assembler) at locations 0004H to 0007H, then they must be moved to different locations.

If you are absolutely locating a segment at those addresses using the linker DATA directive, then another address must be used.

Finally, if you must use those particular locations to store your variables, then you can change the default Register Bank used. This can be achieved by using the REGISTERBANK directive for both the compiler and assembler:

REGISTERBANK(1)

However, selecting Register Bank 0 with the 'using' keyword or using the REGISTERBANK directive somewhere in your code will cause locations 0000H to 0007H to be reserved for the Register Bank again.

MORE INFORMATION

Article last edited on: 2005-07-19 15:19:33

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