warning: yourfile has a LOAD segment with RWX permissions
Posted: Sat Jul 04, 2026 9:52 am
I wrote my own bootloader and was getting this warning: myos.kernel has a LOAD segment with RWX permissions.
I've seen a couple references to this message on the board, but they are all quite old so I didn't want to necropost, and the replies on those other threads didn't actually address the warning, which appears to involve your linker script having overlapping memory segments.
You can fix this by updating your linker script to explicitly declare the segments and mark the code/text section as RX and the data section as RW, or suppress the warning with the flag added to the CFLAGS section of your makefile, which I have confirmed works for me.
This Stack Overflow post gives an example linker.ld. Though it references ARM, this should apply to other architectures as well:
https://stackoverflow.com/questions/734 ... 4_78073698
I've seen a couple references to this message on the board, but they are all quite old so I didn't want to necropost, and the replies on those other threads didn't actually address the warning, which appears to involve your linker script having overlapping memory segments.
You can fix this by updating your linker script to explicitly declare the segments and mark the code/text section as RX and the data section as RW, or suppress the warning with the
Code: Select all
--no-warn-rwx-segmentsThis Stack Overflow post gives an example linker.ld. Though it references ARM, this should apply to other architectures as well:
https://stackoverflow.com/questions/734 ... 4_78073698