From 8e0d422697bb36e077da801fbf615a726d3ecc18 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Tue, 14 Nov 2023 10:31:38 +0100 Subject: [PATCH] stub: remove nondeterminism in binary The linker embeds a timestamp into our UEFI stub. objdump -p reports: Time/Date Mon Nov 13 20:02:35 2023 With /Brepro we get the following instead: Time/Date d597e888 (This is a reproducible build file hash, not a timestamp) Fixes #260 --- rust/uefi/.cargo/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/uefi/.cargo/config b/rust/uefi/.cargo/config index 85d49dc..59052e5 100644 --- a/rust/uefi/.cargo/config +++ b/rust/uefi/.cargo/config @@ -1,2 +1,4 @@ [build] target = "x86_64-unknown-uefi" +# Strip timestamps from binaries. +rustflags = ["-C", "link-args=/Brepro"]