File tree Expand file tree Collapse file tree 7 files changed +14
-16
lines changed
tools/test_apps/system/startup Expand file tree Collapse file tree 7 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,6 @@ else()
75
75
add_custom_target (esp32_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /esp32_out.ld )
76
76
add_dependencies (${COMPONENT_LIB} esp32_linker_script )
77
77
78
- # disable stack protection in files which are involved in initialization of that feature
79
- set_source_files_properties (
80
- cpu_start.c
81
- PROPERTIES COMPILE_FLAGS
82
- -fno-stack-protector )
83
-
84
78
if (CONFIG_SPIRAM_CACHE_WORKAROUND )
85
79
# Note: Adding as a PUBLIC compile option here causes this option to propagate to all components that depend on esp32.
86
80
#
Original file line number Diff line number Diff line change @@ -40,5 +40,3 @@ esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h
40
40
41
41
COMPONENT_EXTRA_CLEAN := esp32_out.ld $(COMPONENT_BUILD_DIR ) /esp32.project.ld
42
42
43
- # disable stack protection in files which are involved in initialization of that feature
44
- cpu_start.o : CFLAGS := $(filter-out -fstack-protector% , $(CFLAGS ) )
Original file line number Diff line number Diff line change @@ -70,10 +70,4 @@ else()
70
70
71
71
add_custom_target (esp32s2_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /esp32s2_out.ld )
72
72
add_dependencies (${COMPONENT_LIB} esp32s2_linker_script )
73
-
74
- # disable stack protection in files which are involved in initialization of that feature
75
- set_source_files_properties (
76
- cpu_start.c
77
- PROPERTIES COMPILE_FLAGS
78
- -fno-stack-protector )
79
73
endif ()
Original file line number Diff line number Diff line change 28
28
"src/stack_check.c"
29
29
PROPERTIES COMPILE_FLAGS
30
30
-fno-stack-protector )
31
+
31
32
set_property (TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections" )
32
33
set_property (TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections" )
33
34
set_property (TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 4 )
Original file line number Diff line number Diff line change @@ -16,4 +16,10 @@ target_link_libraries(${COMPONENT_LIB} INTERFACE "-u start_app")
16
16
17
17
if (NOT CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE )
18
18
target_link_libraries (${COMPONENT_LIB} INTERFACE "-u start_app_other_cores" )
19
- endif ()
19
+ endif ()
20
+
21
+ # Disable stack protection in files which are involved in initialization of that feature
22
+ set_source_files_properties (
23
+ startup.c
24
+ PROPERTIES COMPILE_FLAGS
25
+ -fno-stack-protector )
Original file line number Diff line number Diff line change @@ -5,4 +5,7 @@ COMPONENT_ADD_INCLUDEDIRS := include
5
5
COMPONENT_PRIV_INCLUDEDIRS := private_include port/include
6
6
COMPONENT_ADD_LDFRAGMENTS += linker.lf
7
7
8
- -include $(COMPONENT_PATH ) /port/$(SOC_NAME ) /component.mk
8
+ -include $(COMPONENT_PATH ) /port/$(SOC_NAME ) /component.mk
9
+
10
+ # disable stack protection in files which are involved in initialization of that feature
11
+ startup.o : CFLAGS := $(filter-out -fstack-protector% , $(CFLAGS ) )
Original file line number Diff line number Diff line change
1
+ CONFIG_COMPILER_STACK_CHECK_MODE_ALL=y
2
+ CONFIG_COMPILER_STACK_CHECK=y
You can’t perform that action at this time.
0 commit comments