From 4fcf75265519003d5e4964038258ab03a19349a0 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Wed, 28 Apr 2021 11:24:05 +0200 Subject: [PATCH] Fix objcopy 'memory exhausted' error when extracting the EXST hash section. References: * https://stackoverflow.com/questions/5235009/huge-binary-files-with-objcopy --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb458444f..ef934fa93 100644 --- a/Makefile +++ b/Makefile @@ -378,7 +378,7 @@ $(TARGET_BIN): $(TARGET_UNPATCHED_BIN) # a) regeneration of $(TARGET_BIN), and # b) the results of $(TARGET_BIN) will not be as expected. @echo "Extracting HASH section from unpatched EXST elf $(TARGET_ELF)" "$(STDOUT)" - $(OBJCOPY) $(TARGET_ELF) $(TARGET_EXST_ELF).tmp --dump-section .exst_hash=$(TARGET_EXST_HASH_SECTION_FILE) + $(OBJCOPY) $(TARGET_ELF) $(TARGET_EXST_ELF).tmp --dump-section .exst_hash=$(TARGET_EXST_HASH_SECTION_FILE) -j .exst_hash rm $(TARGET_EXST_ELF).tmp @echo "Patching MD5 hash into HASH section" "$(STDOUT)" -- 2.11.4.GIT