use elf as ext
This commit is contained in:
parent
4e591092db
commit
b4dbce76cf
9 changed files with 31 additions and 61 deletions
12
boot.sh
12
boot.sh
|
@ -1,10 +1,10 @@
|
|||
mkdir -p build && cd build &&
|
||||
gcc ../boot.c -o gcc.out &&
|
||||
./gcc.out < ../boot.c > boot1.s &&
|
||||
riscv64-linux-gnu-gcc-12 -static boot1.s -o boot1.out &&
|
||||
qemu-riscv64 boot1.out < ../boot.c > boot2.s &&
|
||||
riscv64-linux-gnu-gcc-12 -static boot2.s -o boot2.out &&
|
||||
qemu-riscv64 boot2.out < ../boot.c > boot3.s
|
||||
gcc ../boot.c -o gcc.elf &&
|
||||
./gcc.elf < ../boot.c > boot1.s &&
|
||||
riscv64-linux-gnu-gcc-12 -static boot1.s -o boot1.elf &&
|
||||
qemu-riscv64 boot1.elf < ../boot.c > boot2.s &&
|
||||
riscv64-linux-gnu-gcc-12 -static boot2.s -o boot2.elf &&
|
||||
qemu-riscv64 boot2.elf < ../boot.c > boot3.s
|
||||
cmp --silent boot1.s boot2.s && echo "boot1.s == boot2.s" || echo "boot1.s != boot2.s"
|
||||
cmp --silent boot2.s boot3.s && echo "boot2.s == boot3.s" || echo "boot2.s != boot3.s"
|
||||
cmp --silent boot1.s boot3.s && echo "boot1.s == boot3.s" || echo "boot1.s != boot3.s"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue