ARM Technical Support Knowledge Articles

Why do I see the linker warning message L6221E?

Applies to: DS-5, RealView Development Suite (RVDS)


In some situations the following linker warning is emitted:

Warning L6221E: <type1> region <regionname1> with <addrtype1> range [<base1>,<limit1>) overlaps with <type2> region <regionname2> with <addrtype2> range [<base2>,<limit2>).

This error can occur even though information in the scatter-loading description file and map information generated by the linker indicates that the execution regions do not overlap.

In RVCT v4.0 and earlier the linker did not provide as much information making the message harder to understand:

Warning L6221E: <type1> region <regionname1> overlaps with <type1> region <regionname2>



    area area1, code
    bx lr

    area area2, readwrite, noinit
    space 10

    area area3, readwrite
    dcd 10


LR1 0x8000
  ER1 +0
  ER2 +0
  ER3 +0

Built with:

armasm test.s
armlink -o test.axf --scatter scatter.txt test.o


Warning: L6221E: Execution region ER2 with Execution range [0x00008004,0x00008010) overlaps with Execution region ER3 with Load range [0x00008004,0x00008008).


The linker may emit warning message L6221E when an execution region base address overlaps with the load address of another region. This could be due to an incorrect scatter file. The memory map of the image has a load view and an execution view, described by the scatter-loading file. A non-ZI section must have a unique load address and in most cases must have a unique execution address. From RVCT v3.1 onwards, the linker no longer assigns space to ZI execution regions. For more details, see the section named "Scatter files containing relative base address load regions and a ZI execution region" in the armlink User Guide. Therefore this warning might be because a load region LR2 with a relative base address immediately follows a ZI execution region in a load region LR1. 

Since the overlapping part might not have real code or data inside, the warning may be harmless.

From RVCT v4.0 build 821 onwards, the following linker options may be used to find out the addresses of each region, and which execution regions overlap with a load region:

--load_addr_map_info --map --list=map.txt 


Article last edited on: 2014-02-04 14:39:25

Rate this article

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