Skip to content
Commit 9405eaf1 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Alberto Escolar
Browse files

arch: arm: cortex_m: Force literal pool placement in inline asm block



When LTO is enabled, linker may relocate literal pools out of Thumb LDR
instruction's reach causing "offset out of range" errors while linking.

This commit adds `.ltorg` directive in the inline asm blocks where absolute
addresses are loaded using the `ldr` instructions, in order to ensure that
the literal pool containing the absolute addresses are placed near the
`ldr` instructions.

Note that the `.ltorg` directive is recognised by all toolchains supported
by Zephyr and no toolchain abstraction is provided for now.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
(cherry picked from commit d7d3ae5c)
parent f88a83a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment