Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/native: Fix executable stack warning #20307

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

Wer-Wolf
Copy link
Contributor

Contribution description

The tramp assembly was missing a .note.GNU-stack section, meaning the compiler was forced to assume that we require an executable stack.

Fix this by adding the necessary section.

Testing procedure

Build:
make BOARD=native -C tests/core/thread_basic flash test

main(): This is RIOT! (Version: 2024.04-devel-20-gd04df-exec_stack)
first thread

{ "threads": [{ "name": "idle", "stack_size": 8192, "stack_used": 436 }]}
{ "threads": [{ "name": "main", "stack_size": 12288, "stack_used": 2452 }]}
second thread

{ "threads": [{ "name": "nr2", "stack_size": 12288, "stack_used": 736 }]}

The tramp assembly was missing a `.note.GNU-stack` section,
meaning the compiler was forced to assume that we require
an executable stack.

Fix this by adding the necessary section.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
@github-actions github-actions bot added Platform: native Platform: This PR/issue effects the native platform Area: cpu Area: CPU/MCU ports labels Jan 28, 2024
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 29, 2024
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for figuring that out!
This warning has been annoying for quite some time now 😃

@riot-ci
Copy link

riot-ci commented Jan 29, 2024

Murdock results

✔️ PASSED

d04df84 cpu/native: Fix executable stack warning

Success Failures Total Runtime
8629 0 8629 13m:26s

Artifacts

@OlegHahm OlegHahm added this pull request to the merge queue Jan 29, 2024
Merged via the queue into RIOT-OS:master with commit 71fed48 Jan 29, 2024
27 checks passed
@Wer-Wolf Wer-Wolf deleted the exec_stack branch January 30, 2024 15:12
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: native Platform: This PR/issue effects the native platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants