From 7fc9b09c34b1001209d6e8efdacf91c33aa8ea87 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Wed, 20 Dec 2023 13:35:00 +0530 Subject: [PATCH] fix(cmake): for embedded data length use .long attribute For Linux builds if the embedded data length exceeded 16-bit value then the build used to fail with following error: build/x509_crt_bundle.S: Assembler messages: build/x509_crt_bundle.S:4201: Warning: value 0x1056e truncated to 0x56e GNU ASM for X86 systems treats .word attribute as of size 2 bytes, this commit uses .long attribute to take the size to 4 bytes. --- tools/cmake/scripts/data_file_embed_asm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cmake/scripts/data_file_embed_asm.cmake b/tools/cmake/scripts/data_file_embed_asm.cmake index 5a86d70335..4ac59936ca 100644 --- a/tools/cmake/scripts/data_file_embed_asm.cmake +++ b/tools/cmake/scripts/data_file_embed_asm.cmake @@ -83,4 +83,4 @@ if(FILE_TYPE STREQUAL "TEXT") else() make_and_append_identifier("${varname}_length") endif() -append_line(".word ${data_len}") +append_line(".long ${data_len}")