GNU-stack section implies executable stack

When building code with such software versions

PACKAGES:

  • framework-arduinoespressif32 @ 3.2.1
  • framework-arduinoespressif32-libs @ 5.4.0+sha.858a988d6e
  • tool-esptoolpy @ 5.0.0
  • toolchain-xtensa-esp-elf @ 14.2.0+20241119

I get a warning from the GCC compiler:

missing .note.GNU-stack section implies executable stack

it says that I need to set the -noexecstack build flags, how can I do this using platformio.ini?

The only thing I tried was this:

build_flags =
-Wl, noexecstack

No help🙄

Please provide detailed information about your project.
Show at least the content of your platformio.ini.

1 Like

There aren’t many details, I just use this fork:

platform =
https://github.com/pioarduino/platform-espressif32

Previously I did not specify the flag quite correctly, due to lack of knowledge, how to work with -Wl:grinning:
It’s a pity, apparently no one has encountered such warnings.
Without a flag, the warnings are like this:


With flag no warnings

build_flags = 
  -Wl,-z,noexecstack

Unfortunately you did not provide the full content of your platformio.ini. That might be the reason why no one was able to help you / find the cause of your issue.

1 Like
[platformio]
description = LVGL on GUItion hardware 3636W518
default_envs = 360_360_LVGL_9

[env:360_360_LVGL_9]
platform = 
  https://github.com/pioarduino/platform-espressif32
board = esp32-s3-devkitc-1-n16r8
framework = arduino
monitor_speed = 115200
monitor_port = COM8
upload_speed = 921600
upload_port = COM8
monitor_filters = esp32_exception_decoder
lib_deps = 
build_unflags = 
  ; -std=gnu++11
  ; -O0
build_flags = 
  ; Don't use lv_conf.h. Tweak params via platfom.ini.
  -D LV_CONF_SKIP
  -D LV_CONF_INCLUDE_SIMPLE
  -D LV_USE_LOG=1
  -D LV_MEM_SIZE="(98U * 1024U)"
  -D LV_DEF_REFR_PERIOD=5
  -D BOARD_HAS_PSRAM ;Start Psram
  -Wl,-z,noexecstack
[env:SECOND]
platform = 
  espressif32
board = esp32-s3-devkitc-1
framework = arduino

Probably🙄
Maybe warnings of this kind appear when the flag -D LV_USE_LOG=1 is set

Anyway, thank you too.
I hope this helps those who will encounter something similar in the future :grinning:

1 Like