13.3 Linker changes between RVCT v3.0 and RVCT v3.1

Various changes have been made to armlink in RVCT v3.1.

In a scatter file, special case handling of the load address of root ZI has been removed. Consider:

LR1 0x8000
{
    ER_RO +0
    {
        *(+RO)
    }
    ER_RW +0
    {
        *(+RW)
    }
    ER_ZI +0
    {
        *(+ZI)
    }
}
LR2 +0
{
    …
}

In versions of RVCT up to v3.0 the linker includes the size of ER_ZI when calculating the base address of LR2. The justification being that at image initialization ER_ZI is written over the top of LR2.

In version 3.1 and later this special case has been removed because you can write an equivalent scatter file using ImageLimit() built-in function, for example:

LR1 0x8000
{
    ER_RO +0
    {
         *(+RO)
    }
    ER_RW +0
    {
        *(+RW)
    }
    ER_ZI +0
    {
        *(+ZI)
    }
}
LR2 ImageLimit(LR1)
{
    …
}
Non-ConfidentialPDF file icon PDF versionARM DUI0530M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.