Keil™, An ARM® Company

RealView Linker and Utilities Guide

Placing ARM libraries

5.3.7. Placing ARM libraries

You can place code from the ARM standard C and C++ libraries in a scatter-loading description file. Use *armlib or *armlib* so that the linker can resolve library naming in your scatter-loading file. For example:

ER 0x2000
{
    *armlib/c_* (+RO)                   ; all ARM‑supplied C libraries
    ...                                 ; rest of scatter description...
}

Example 5.21 shows how to place library code.

Note

In Example 5.21, forward slashes are used in path names to ensure they are understood on Windows and Unix platforms.

Example 5.21. Placing ARM library code

ROM1 0
{
    * (InRoot$$Sections)
    * (+RO)
	ROM2 0x1000
	{
    	    *armlib/c_* (+RO)         ; all ARM‑supplied C library functions
	}
}
ROM3 0x2000
{
    *armlib/h_* (+RO)                   ; just the ARM‑supplied __ARM_*
                                        ; redistributable library functions
}
RAM1 0x3000
{
    *armlib* (+RO)                      ; all other ARM‑supplied library code
                                        ; e.g. floating‑point libraries
}
RAM2 0x4000
{
    * (+RW, +ZI)
}
Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0377A