Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Jul 8, 2025

Backport d7d3ae5 from #92569.

Fixes #90777

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: Stephanos Ioannidis <[email protected]>
(cherry picked from commit d7d3ae5)
@github-actions github-actions bot added the Backport Backport PR and backport failure issues label Jul 8, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Jul 8, 2025
@JarmouniA JarmouniA added the area: ARM ARM (32-bit) Architecture label Jul 8, 2025
@JarmouniA JarmouniA requested review from stephanosio and wearyzen July 8, 2025 09:52
@JarmouniA JarmouniA requested a review from swift-tk July 8, 2025 10:12
@GoranWall
Copy link

GoranWall commented Jul 9, 2025

Unfortunately this is not supported by IAR and breaks building with CXARM 9.70.1. Many are on vacation right now and as I am not a developer I cannot trouble shoot this myself.

@kartben kartben closed this Jul 11, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Backports Jul 11, 2025
@kartben kartben reopened this Jul 11, 2025
@github-project-automation github-project-automation bot moved this from Done to Needs more info in Backports Jul 11, 2025
@sonarqubecloud
Copy link

@kartben kartben merged commit f82ade9 into v4.1-branch Jul 25, 2025
45 of 47 checks passed
@github-project-automation github-project-automation bot moved this from Needs more info to Done in Backports Jul 25, 2025
@kartben kartben deleted the backport-92569-to-v4.1-branch branch July 25, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ARM ARM (32-bit) Architecture Backport Backport PR and backport failure issues

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants