Skip to content

cpu/native: Fix executable stack warning#20307

Merged
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
Wer-Wolf:exec_stack
Jan 29, 2024
Merged

cpu/native: Fix executable stack warning#20307
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
Wer-Wolf:exec_stack

Conversation

@Wer-Wolf
Copy link
Copy Markdown
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 <[email protected]>
@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
@benpicco benpicco requested review from kaspar030 and maribu January 29, 2024 09:37
Copy link
Copy Markdown
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
Copy Markdown

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
@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.

5 participants