From d2ed7c21ace5926df16f87fc399deefd4e3b1238 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Wed, 26 Jul 2023 02:39:21 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=201/2=20for=20objcopy?= =?UTF-8?q?=20unaligned=20sections=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to a bug in llvm-objcopy sections must be explicitly aligned, see https://github.com/llvm/llvm-project/issues/58407 and https://github.com/rust-lang/rust/issues/102983 This fix just replaces rust-objcopy with a GNU binutils counterpart from `brew install aarch64-elf-binutils`. Next commit will do a less intrusive fix. --- Makefile.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index 5ec097b..7dae614 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -50,7 +50,7 @@ PLATFORM_TARGET="--target=${TARGET_JSON} --features=${TARGET_FEATURES}" DEVICE_FEATURES = "noserial" QEMU_FEATURES = "qemu,rpi3" -OBJCOPY = "rust-objcopy" # Part of `cargo objcopy` in cargo-binutils +OBJCOPY = "/opt/homebrew/Cellar/aarch64-elf-binutils/2.40/bin/aarch64-elf-objcopy" # Part of `cargo objcopy` in cargo-binutils OBJCOPY_PARAMS = "--strip-all -O binary" NM = "rust-nm" # Part of `cargo nm` in cargo-binutils