From d24a127f63558f4d57c8542e61d05b11c30c6e8f Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 20 Dec 2025 10:44:04 +0000 Subject: [PATCH] echoplayer: enable USE_ELF to generate ELF binaries Make the final .echo binary an ELF file. Most STM32s have their SRAM divided in multiple non-contiguous regions and putting an ELF loader in the bootloader is basically the only reasonable way to load Rockbox on such a system. Change-Id: I818ef9fefe0d53b44cf64402ee1794ad261343eb --- tools/configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/configure b/tools/configure index b9c28dfe13..5db7f218cf 100755 --- a/tools/configure +++ b/tools/configure @@ -4337,6 +4337,11 @@ fi # generate debug symbols by default; these will be present in the # initial '.elf' file but will be stripped from the target binary. GCCOPTS="-g $GCCOPTS" + # set page size to 4k to guarantee reasonable on-disk alignment, + # which improves disk read speed; on ARM binutils defaults to 64k + # which adds quite a bit of unnecessary padding. + GCCOPTS="-Wl,-z,max-page-size=4096 $GCCOPTS" + USE_ELF="yes" ;; 280|surfansf28)