Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

core: Fix thread section alignment.#209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
iabdalkader wants to merge2 commits intoarduino:main
base:main
Choose a base branch
Loading
fromiabdalkader:fix_thread_section_alignment

Conversation

iabdalkader
Copy link

@iabdalkaderiabdalkader commentedOct 1, 2025
edited
Loading

The _static_thread_data struct contains int64_t members that require 8-byte alignment. When placed in a 4-byte aligned section, it causes the linker to insert padding, which in turn causes__static_thread_data_list_start to point to the padding not to the first iterable.

GNU ld automatically aligns output sections based on the strictest alignment requirement of input sections, so moving__static_thread_data_list to its own section fixes the problem.

facchinm reacted with heart emojipillo79 reacted with rocket emoji
@iabdalkaderiabdalkaderforce-pushed thefix_thread_section_alignment branch from6588cbd toccc56ceCompareOctober 1, 2025 13:36
@iabdalkaderiabdalkader changed the titleFix thread section alignment.core: Fix thread section alignment.Oct 1, 2025
The _static_thread_data struct contains int64_t members that require 8-bytealignment. When placed in a 4-byte aligned section, it causes the linker toinsert padding, which in turn causes __static_thread_data_list_start to pointto the padding not to the first iterable.GNU ld automatically aligns output sections based on the strictest alignmentrequirement of input sections, so moving __static_thread_data_list to its ownsection fixes the problem.Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkaderiabdalkaderforce-pushed thefix_thread_section_alignment branch fromccc56ce to8bdc53eCompareOctober 1, 2025 13:59
According to Zephyr documentation, k_thread_create() both initializesand starts the thread. The second loop that was calling k_thread_start()on each static thread was redundant.Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkaderiabdalkaderforce-pushed thefix_thread_section_alignment branch from8bdc53e to1bab673CompareOctober 1, 2025 14:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@iabdalkader

[8]ページ先頭

©2009-2025 Movatter.jp