fix stack alignment to 8 bytes for ARM AAPCS compliance - #11841
avm1234567 wants to merge 1 commit into
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_stm32Reviewers: @Liang1795 @hamburger-os @wdfk-prog Changed Files (Click to expand)
🏷️ Tag: bsp_stm32f103-blue-pillReviewers: @Liang1795 Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-09-27 20:57 CST)
📝 Review Instructions
|
Summary
Fixes stack alignment issue for STM32 targets to comply with ARM AAPCS (Issue #7527).
The .stack section in STM32 linker scripts was incorrectly aligned to 4 bytes. According to the ARM Procedure Call
Standard , the stack pointer (SP) must be 8-byte aligned at public function boundaries.
This PR changes ALIGN(4) to ALIGN(8) in the .stack section for all affected STM32 BSP linker scripts and templates.
Changes
98 boards).
Files Changed
Templates (12):
BSP Boards (98):
All 98 remaining link.lds files across bsp/stm32/stm32*/board/linker_scripts/link.lds that contained ALIGN(4) in
the .stack section.