File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ endif
200200
201201ifeq ($(USE_CLANG ) ,1)
202202 ifeq ($(ARCH),ARM)
203- OBJCOPY_BIN_FLAGS+ =-j .text -j .ramcode -j .keystore -j .edidx -j .gnu.sgstubs
203+ OBJCOPY_BIN_FLAGS+ =$( CLANG_ARM_OBJCOPY_FLASH_FLAGS_BOOT )
204204 endif
205205endif
206206ifeq ($(TARGET ) ,ti_hercules)
Original file line number Diff line number Diff line change @@ -1295,6 +1295,12 @@ ifeq ($(USE_CLANG),1)
12951295 CFLAGS+ =-Wno-unknown-attributes -Wno-error=unknown-attributes
12961296 CFLAGS+ =-fno-unwind-tables -fno-asynchronous-unwind-tables
12971297 LSCRIPT_FLAGS+ =-T $(abspath $(WOLFBOOT_ROOT ) /hal/clang-discard.ld)
1298+ # Keep Clang-specific raw-image section selection in one place. Both the
1299+ # bootloader and test-app need flash-backed sections only, but the bootloader
1300+ # has a few extra output sections that must be preserved.
1301+ CLANG_ARM_OBJCOPY_FLASH_FLAGS_BASE: =-j .text -j .edidx
1302+ CLANG_ARM_OBJCOPY_FLASH_FLAGS_BOOT: =$(CLANG_ARM_OBJCOPY_FLASH_FLAGS_BASE ) -j .ramcode -j .keystore -j .gnu.sgstubs
1303+ CLANG_ARM_OBJCOPY_FLASH_FLAGS_APP: =$(CLANG_ARM_OBJCOPY_FLASH_FLAGS_BASE )
12981304endif
12991305
13001306ifeq ($(USE_GCC ) ,1)
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ ifeq ($(USE_CLANG),1)
108108 # Clang-built ARM ELFs can keep RAM sections as loadable segments, and raw
109109 # objcopy output then expands the flash-to-RAM gap into a huge sparse image.
110110 # The app image only needs the flash-backed output sections.
111- OBJCOPY_IMAGE_FLAGS+ =-j .text -j .edidx
111+ OBJCOPY_IMAGE_FLAGS+ =$( CLANG_ARM_OBJCOPY_FLASH_FLAGS_APP )
112112endif
113113
114114ifeq ($(DEBUG_UART ) ,1)
You can’t perform that action at this time.
0 commit comments