ARM Technical Support Knowledge Articles

Placing root region library objects in a scatter file

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

Answer

When using a scatter file to place code and data with RVCT 2.1 or later, the linker may report:

Error: L6202E: __scatter.o(!!!scatter) cannot be assigned to non-root region

or:

Warning: L6330W: Undefined symbol ZISection$$Table$$Base (referred from foo.o). Unused
section has been removed.

A root region is a region which has an execution address the same as its load address, and so the region does not need to be moved/copied by the scatter load initialisation code.

In RVCT 2.0 and earlier tools, it is necessary to explicitly place certain sections into a root execution region, for example:

ROM_LOAD 0x0
{
    ROM_EXEC 0x0
    {
        vectors.o (Vect, +First)
        __main.o (+RO)
        * (Region$$Table)
        * (ZISection$$Table)
    }
    RAM_EXEC 0x100000
    {
        *.o (+RO,+RW,+ZI)
    }
}

In RVCT 2.1, a new region tables format has been introduced to support the new compression mechanisms. This new format no longer contains ZISection$$Table.  Furthermore, new scatter-loading (__scatter*.o) and decompressor (__dc*.o) objects from the library must be placed in a root region, so the above example must be changed to:

ROM_LOAD 0x0
{
    ROM_EXEC 0x0
    {
        vectors.o (Vect, +First)
        __main.o(*)
        * (Region$$Table)
        __scatter*.o(*)
        __dc*.o(*)
    }
    RAM_EXEC 0x100000
    {
        *.o (+RO,+RW,+ZI)
    }
}

Alternatively, use the new linker InRoot$$Sections selector to automatically place all the necessary library objects that must be in a root region, for example:

ROM_LOAD 0x0
{
    ROM_EXEC 0x0
    {
        vectors.o (Vect, +First)
        * (InRoot$$Sections)
    }
    RAM_EXEC 0x100000
    {
        *.o (+RO,+RW,+ZI)
    }
}

See the appropriate compilation toolchain's linker documentation for more details.

Article last edited on: 2011-08-30 15:50:30

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