diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 56f35bd..213c9d4 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -3,7 +3,6 @@ idf_component_register( SRCS /dev/null PRIV_INCLUDE_DIRS "." - LDFRAGMENTS "linker.lf" ) idf_build_get_property(target IDF_TARGET) @@ -43,7 +42,7 @@ endforeach() target_compile_options(${COMPONENT_LIB} PUBLIC "$<$:SHELL: -target riscv32-none-none-eabi -Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library -Osize - -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} + -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} -Xcc -fno-pic -Xcc -fno-pie -pch-output-dir /tmp -Xfrontend -enable-single-module-llvm-emission ${SWIFT_INCLUDES} @@ -63,3 +62,10 @@ target_sources(${COMPONENT_LIB} Main.swift FileSystem.swift ) + +add_custom_command( + TARGET ${COMPONENT_LIB} + POST_BUILD + COMMAND ${CMAKE_OBJCOPY} --remove-section .swift_modhash + $ $ +) diff --git a/main/linker.lf b/main/linker.lf deleted file mode 100644 index 0599872..0000000 --- a/main/linker.lf +++ /dev/null @@ -1,21 +0,0 @@ -[sections:flash_text_swift] -entries: - .swift_modhash+ - -[sections:dram0_swift] -entries: - .got+ - .got.plt+ - -[scheme:swift_default] -entries: - flash_text_swift -> flash_text - dram0_swift -> dram0_data - -[mapping:swift_default] -archive: * -entries: - * (swift_default); - flash_text_swift -> flash_text SURROUND (swift_text), - dram0_swift -> dram0_data SURROUND (swift_dram0) -