|Non-Confidential||PDF version||ARM DUI0471M|
|Home > Embedded Software Development > Building applications for execute-only memory|
Placing code in execute-only memory prevents users from trivially reading that code.
To build an application with code in execute-only memory:
armcc -c --execute_only test.c -o test.o
--execute_only option prevents the compiler from
generating any data accesses to the code sections.
To keep code and data in separate sections, the compiler disables the placement of literal pools inline with code.
Compiled code sections have the
AREA ||.text||, CODE, EXECONLY, ALIGN=1
The assembler faults any attempts to define data in an
EXECONLY code section.
+XO selector in a scatter file.
armlink --xo-base option on the command-line.
armlink --xo-base=0x8000 test.o -o test.axf
The XO execution region is placed in a separate load region from the RO, RW, and ZI execution regions.
If you do not specify
--xo-base, then by default: