CLANG: fix sparse image for test-app in trustzone

pull/730/head
Daniele Lacamera 2026-03-25 06:07:20 +01:00 committed by Mattia Moffa
parent bcd4d8b9e6
commit ce24cd2a06
1 changed files with 5 additions and 2 deletions

View File

@ -107,8 +107,11 @@ OBJCOPY_IMAGE_FLAGS:=
ifeq ($(USE_CLANG),1)
# Clang-built ARM ELFs can keep RAM sections as loadable segments, and raw
# objcopy output then expands the flash-to-RAM gap into a huge sparse image.
# The app image only needs the flash-backed output sections.
ifneq ($(TZEN),1)
# The app image only needs the flash-backed output sections. TrustZone
# non-secure apps also need the flash-backed .data load image.
ifeq ($(TZEN),1)
OBJCOPY_IMAGE_FLAGS+=-j .text -j .edidx -j .data
else
OBJCOPY_IMAGE_FLAGS+=$(CLANG_ARM_OBJCOPY_FLASH_FLAGS_APP)
endif
endif