From: HimbeerserverDE Date: Tue, 13 Sep 2022 19:04:00 +0000 (+0200) Subject: Rust: produce executable in binary format (was ELF before) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=33700f439c0fdc57cccebbf6c56cd0c83f79220e;p=loadnothing.git Rust: produce executable in binary format (was ELF before) --- diff --git a/Makefile b/Makefile index 91b0bff..1cd8e25 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,9 @@ magic.bin: echo -en "\x55\xAA" > magic.bin stage2/target/x86_64-loadnothing/release/stage2: stage2/src/main.rs - cd stage2 && cargo build --release + cd stage2 && cargo rustc --release -- --emit=obj + ld -o stage2/target/x86_64-loadnothing/release/stage2.bin --oformat binary stage2/target/x86_64-loadnothing/release/stage2 -Ttext=0x7e00 + mv stage2/target/x86_64-loadnothing/release/stage2.bin stage2/target/x86_64-loadnothing/release/stage2 nothing.img: magic.bin stage2/target/x86_64-loadnothing/release/stage2 stage1/boot.bin dd if=/dev/zero of=nothing.img bs=32M count=1