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

recent gcc complains about "LOAD segment with RWX permissions" #106

Open
fenugrec opened this issue Aug 28, 2022 · 4 comments
Open

recent gcc complains about "LOAD segment with RWX permissions" #106

fenugrec opened this issue Aug 28, 2022 · 4 comments

Comments

@fenugrec
Copy link
Collaborator

/usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: warning: cantact_fw has a LOAD segment with RWX permissions

Trying the naive fix of editing the .ldscripts RAM section as

RAM (rw) : ORIGIN = 0x20000000, LENGTH = 6K

has no effect.

A search quickly indicates we're not the only ones seeing this :

https://stackoverflow.com/questions/73429929/gnu-linker-elf-has-a-load-segment-with-rwx-permissions-embedded-arm-project

I haven't had time to dig any further.
I'm also fairly certain this can be disregarded on baremetal, non-MMU firmware like this.

@marckleinebudde
Copy link
Contributor

fenugrec added a commit that referenced this issue Nov 23, 2022
It has no business being marked "rwx". Related to #106 on GH, but
doesn't fix the "LOAD segment with RWX permissions" warning.
@fenugrec
Copy link
Collaborator Author

fenugrec commented Nov 23, 2022

can we add --no-warn-rwx-segmentssystematically or would that break on older binutils versions ?

[EDIT] ugh, no, that won't work on older versions. Not sure how I feel about doing binutils version checking in cmakelists. Doesn't bother me enough to spend time on this.

@fenugrec
Copy link
Collaborator Author

Maybe cmake has a mechanism to check for ld-options ?
Projects using plain makefiles have to resort to this kind of script

https://github.com/OP-TEE/optee_os/blob/203ee23d005b2cec2f21b5de334c5a246be32599/mk/cc-option.mk

@marckleinebudde
Copy link
Contributor

marckleinebudde commented Nov 23, 2022

I think it's supported by cmake diretly?
https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html

marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue May 11, 2023
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jan 24, 2024
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jan 25, 2024
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
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

2 participants