From b56bb7d8e4ea3f2a20eb39cf65e1dd3a223d0603 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 27 Nov 2023 10:44:56 +0100 Subject: [PATCH] fix(cmake): don't emit section directive when embedding files on host --- tools/cmake/scripts/data_file_embed_asm.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cmake/scripts/data_file_embed_asm.cmake b/tools/cmake/scripts/data_file_embed_asm.cmake index 5a86d70335..1cbdb66129 100644 --- a/tools/cmake/scripts/data_file_embed_asm.cmake +++ b/tools/cmake/scripts/data_file_embed_asm.cmake @@ -71,7 +71,9 @@ endif() append_line(" */") append_line(".data") +append_line("#if !defined (__APPLE__) && !defined (__linux__)") append_line(".section .rodata.embedded") +append_line("#endif") make_and_append_identifier("${varname}") make_and_append_identifier("_binary_${varname}_start" "for objcopy compatibility") append("${data}")