Hi,
I'm using the latest MCUXpresso IDE. When I use "Create a new C/C++ project..." and create the simplest project possible (no peripherals added), and I compile this, I get the following warning:
warning: MIMXRT1011_Project_Empty.axf has a LOAD segment with RWX permissions
How can I get rid of this?
Hi @simmania,
This is an arm-none-eabi GCC warning that occurs when you have data and code residing in the same memory region (aka segment). As stated on the following post: "The memory storing data must be writable (W), and code memory must be executable (X). Both must be readable (R). Thus, a segment that stores both data and code sections is RWX, which leaves your program vulnerable to attacks like buffer overflows."
You can get rid of the warning by simply adding "(READONLY)" for each section that goes only into flash memory. The aforementioned post describes the issue and solution in much more detail, so please take a look into it.
BR,
Edwin.