RTEMS | cpukit/libdl/arm: Fix trampoline alignment (!367)
Ranulfo Raphael (@ranulfo)
gitlab at rtems.org
Thu Jan 23 22:06:06 UTC 2025
Ranulfo Raphael created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/367
Project:Branches: ranulfo/rtems:6-fix_arm_tramp_alignment to rtems/rtos/rtems:6
Author: Ranulfo Raphael
## Summary
cpukit/libdl/arm: Fix trampoline alignment
This commit aligns trampolines for THUMB and ARM instructions
(CALL/JUMP24 and THM_JUMP24/THM_PC22).
According to the ARM technical reference in section "Register-relative
and PC-relative expressions":
In Thumb code:
- For B, BL, CBNZ, and CBZ instructions, the value of the PC is the
address of the current instruction plus 4 bytes.
- For all other instructions that use labels, the value of the PC is
the address of the current instruction plus 4 bytes, with bit[1]
of the result cleared to 0 to make it word-aligned.
https://developer.arm.com/documentation/dui0473/m/symbols--literals--expressions--and-operators/register-relative-and-pc-relative-expressions
<!-- Default settings, if it is a dropdown it will set after submission -->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/367
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250123/7e5c08e5/attachment-0001.htm>
More information about the bugs
mailing list