The linker can attempt to merge identical constants in objects targeted at AArch32 state. The objects must be produced with Arm® Compiler 6. If you compile with the armclang-ffunction-sections option, the merge is more efficient. This option is the default.
The following procedure is an example that shows the merging feature.
Procedure
Create a C source file, litpool.c, containing the
following code:
int f1() {
return 0xdeadbeef;
}
int f2() {
return 0xdeadbeef;
}
Compile the source with -S to
create an assembly file:
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.