@@ -6,15 +6,24 @@ build-std-features = ["compiler-builtins-mem"]
66target = " x86_64-unknown-none"
77
88[target .x86_64-unknown-none ]
9- runner = " qemu-system-x86_64 -display none -serial stdio -kernel hermit-loader-x86_64 -cpu Skylake-Client -device isa-debug-exit,iobase=0xf4,iosize=0x04 -smp 1 -m 2G -netdev user,id=u1,hostfwd=tcp::9975-:9975,hostfwd=udp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 -device virtio-net-pci,netdev=u1,disable-legacy=on -monitor telnet:127.0.0.1:12345,server,nowait -initrd"
9+ runner = " qemu-system-x86_64 -display none -serial stdio -kernel hermit-loader-x86_64-multiboot -cpu Skylake-Client -device isa-debug-exit,iobase=0xf4,iosize=0x04 -smp 1 -m 2G -netdev user,id=u1,hostfwd=tcp::9975-:9975,hostfwd=udp::9975-:9975,net=192.168.76.0/24,dhcpstart=192.168.76.9 -device virtio-net-pci,netdev=u1,disable-legacy=on -monitor telnet:127.0.0.1:12345,server,nowait -initrd"
1010
1111[target .aarch64-unknown-none-softfloat ]
1212runner = " sh ./qemu-aarch64.sh"
13- rustflags = [" -Clink-arg=--image-base=0x40400000" ]
13+ # Link boot_image as a static PIE so the loader can place it anywhere in RAM.
14+ # The target spec does not enable static PIE, so `-pie` must be passed
15+ # explicitly; `-Crelocation-model=pic` alone still yields an ET_EXEC
16+ # linked at lld's default base (0x200000), which is outside of RAM.
17+ rustflags = [
18+ " -Crelocation-model=pic" ,
19+ " -Clink-arg=-pie" ,
20+ " -Clink-arg=--no-dynamic-linker" ,
21+ " -Clink-arg=-ztext" ,
22+ ]
1423
1524[target .riscv64gc-unknown-none-elf ]
1625# Uses QEMU's bundled OpenSBI as the default -bios for the virt machine.
17- runner = " qemu-system-riscv64 -machine virt -cpu rv64 -smp 1 -m 2G -display none -serial stdio -kernel hermit-loader-riscv64 -initrd"
26+ runner = " qemu-system-riscv64 -machine virt -cpu rv64 -smp 1 -m 2G -display none -serial stdio -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin - kernel hermit-loader-riscv64-sbi -initrd"
1827# RAM on the virt machine starts at 0x8000_0000; OpenSBI occupies the
1928# first 512 KiB and the loader sits at 0x8020_0000. Link the kernel
2029# image above both (the loader loads ELF segments at their link
0 commit comments