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

build system: add --no-warn-rwx-segments to linker #20381

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented Feb 12, 2024

Contribution description

Before we disabled the warning about RWX segments only for picolibc, but this issue is popping up on more and more toolchains (looking at MSP430 and RISC-V). Other than on native/native64, there is no MMU to enforce whatever permissions the segments contain anyway. (And writing to ROM with regular store instructions will not be possible even without the need for an MMU.)

So let's just globally disable this warning, unless building for native and native64.

Testing procedure

Building in master with RIOT-OS/riotdocker#248 will issue the RWX warning for every app now. And so does building on Alpine for MSP430.

With this PR the in our context not helpful warning is disabled.

Issues/PRs references

Not necessary, but useful for RIOT-OS/riotdocker#248

Before we disabled the warning about RWX segments only for picolibc,
but this issue is popping up on more and more toolchains (looking
at MSP430 and RISC-V). Other than on `native`/`native64`, there is no
MMU to enforce whatever permissions the segments contain anyway.
(And writing to ROM with regular store instructions will not be possible
even without the need for an MMU.)

So let's just globally disable this warning, unless building for
`native` and `native64`.
@github-actions github-actions bot added the Area: build system Area: Build system label Feb 12, 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 Feb 13, 2024
@riot-ci
Copy link

riot-ci commented Feb 13, 2024

Murdock results

✔️ PASSED

c9f16f1 build sytem: add --no-warn-rwx-segments to linker

Success Failures Total Runtime
10011 0 10011 11m:33s

Artifacts

Copy link
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

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

Works as intended! Thanks, it really was annoying me.

Note: You are disregarding it lightly because "theres no MMU" but we do have systems with an MPU. Which could easily make the linker happy :> But that's an adventure the size of Narnia.

@maribu maribu added this pull request to the merge queue Mar 18, 2024
Merged via the queue into RIOT-OS:master with commit f0d2906 Mar 18, 2024
27 checks passed
@maribu maribu deleted the build-system/no-warn-rwx branch March 18, 2024 18:18
@maribu
Copy link
Member Author

maribu commented Mar 18, 2024

Thx :)

@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
@maribu maribu changed the title build sytem: add --no-warn-rwx-segments to linker build system: add --no-warn-rwx-segments to linker Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants