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

Fix arm-none-eabi-ld: warning: /github/workspace/sources/nuttx/nuttx has a LOAD segment with RWX permissions #11462

Open
xiaoxiang781216 opened this issue Dec 28, 2023 · 2 comments

Comments

@xiaoxiang781216
Copy link
Contributor

Report from all ci console, like this:
https://github.com/apache/nuttx/actions/runs/7347758008/job/20004759931

@pkarashchenko
Copy link
Contributor

I'm not sure how to fix this especially when the part of the code is relocated to SRAM.

@codusnocturnus
Copy link

codusnocturnus commented Feb 4, 2024

Just getting into this level of development, and am only working with STM32, so I can't say it's an all-around fix with no edge cases, but the solution on this blog seems to work: Solution to LOAD segment with RWX permissions warning with CMSIS

To summarize, define a PHDRS block in the linker script with descriptions for the text, data, and bss segments, and assign the segments to the related output sections.

The warning goes away, and the ELF listing will show that the flags on segment 0 are now "correct".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants