‑‑no_literal_pool
Syntax
‑‑no_literal_pool Description
Use this option to generate code that should run from a memory region where it is not allowed to read data, only to execute code. In 64-bit mode, this option has no effect.
When this option is used, the compiler will construct addresses and large constants with the MOV32 pseudo instruction instead of using a literal pool: switch statements are no longer translated using tables, and constant data is placed in the .rodata section.
This option also affects the automatic library selection performed by the linker. An IAR-specific ELF attribute is used for determining whether libraries compiled with this option should be used.
This option is only allowed for Armv6-M and Armv7 cores, and can be combined with the options ‑‑ropi or ‑‑rwpi only for Armv7 cores (includes Armv8-M, Armv8.1-M, Armv8-A, and Armv8-R cores).
Note
For the M architecture profile (Cortex-M cores), this option is only available when you use the little-endian byte order.
See also
Caution
Project>Options>C/C++ Compiler>Code>No data reads in code memory