You can place C++ library code using a scatter file.
To place C++ library
code, specify the library path and library name as the module selector. You can use
wildcard characters if required.
Procedure
Create the following C++
program, foo.cpp:
#include <iostream>
using namespace std;
extern "C" int foo ()
{
cout << "Hello" << endl;
return 1;
}
To place the C++ library
code, define the following scatter file,
scatter.scat:
LR 0x8000
{
ER1 +0
{
*armlib*(+RO)
}
ER2 +0
{
*libcxx*(+RO)
}
ER3 +0
{
*(+RO)
; All .ARM.exidx* sections must be coalesced into a single contiguous
; .ARM.exidx section because the unwinder references linker-generated
; Base and Limit symbols for this section.
*(0x70000001) ; SHT_ARM_EXIDX sections
; All .init_array sections must be coalesced into a single contiguous
; .init_array section because the initialization code references
; linker-generated Base and Limit for this section.
*(.init_array)
}
ER4 +0
{
*(+RW,+ZI)
}
}
The name *armlib* matches
install_directory\lib\armlib, indicating the
Arm® C
library files that are located in the armlib directory.
The name *libcxx* matches
install_directory\lib\libcxx, indicating the C++ library files that
are located in the libcxx directory.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.