STM32CuebIDE Issue 169316: “elf has a LOAD segment with RWX permissions”
Hello,
The errata for STM32CubeIDE v1.15 lists the known issue, 169316 "elf has a LOAD segment with RWX permissions", however while v1.16 still lists this as a known issue, it also lists it under "Fixed Issues". Could you kindly confirm the current state of this issue, and if it is actually fixed, what the fix is?
As far I can tell the warning is still generated in my v1.16 installation (GNU Tools for STM32 12.3, gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623). As the "workaround" is not backward compatible with the GNU tools earlier than version 10, and such conditionals can't be checked within the linker script itself, this is rather ugly when also having to support new and old toolchains, especially as the warning itself doesn't necessarily seem particularly applicable to embedded microcontroller executables.
As far as I understand, the ELF sections SHT_INIT_ARRAY, SHT_PREINIT_ARRAY and SHT_FINI_ARRAY are defined to have SHF_ALLOC+SHF_WRITE attributes, so I understand why GCC emits these attributes. However, is SHF_WRITE really valid for arm-none-eabi targets where these tables are typically placed in Flash without the need to be relocated during any dynamic loading?
It does appear there has been a precedent for not setting the SHF_WRITE attribute for these input sections in the past, could something similar be considered here for bare metal targets?
https://gcc.gnu.org/pipermail/gcc-patches/2005-January/160955.html
Thanks,
Paul
