你的代码 / 依赖的库没有生成这个安全标记节,链接器(ld.exe)认为你的程序栈默认是可执行的,不符合现代安全规范,所以抛出 deprecated(废弃行为)警告。

已经通过在 C 侧添加了 `.note.GNU-stack 节来消除这个警告。
This commit is contained in:
zqm
2026-04-02 15:15:55 +08:00
parent 198461a0c4
commit 3a398a1cbd
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
idf_component_register(SRCS "my_usb_project.c" "../rust_app/rust_app_wrapper.c"
idf_component_register(SRCS "my_usb_project.c" "../rust_app/rust_app_wrapper.c" "stack_note.S"
INCLUDE_DIRS "."
PRIV_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../rust_app")

View File

@@ -0,0 +1,3 @@
.section .note.GNU-stack,"",%progbits