convert gc to c

This commit is contained in:
nub31
2025-05-03 16:32:51 +02:00
parent aa970f1abb
commit bfc3aad516
11 changed files with 306 additions and 488 deletions

View File

@@ -1,19 +1,11 @@
#!/bin/sh
# baseline
nasm -g -felf64 ../input/baseline/gc.asm -o gc.o
nasm -g -felf64 ../input/baseline/alloc.asm -o alloc.o
gcc -c -g -O2 -fno-stack-protector -fno-builtin ../input/baseline/gc.c -o gc.o
nasm -g -felf64 ../input/baseline/str_cmp.asm -o str_cmp.o
# core
nasm -g -felf64 ../input/core/str_len.asm -o str_len.o
nasm -g -felf64 ../input/core/arr_size.asm -o arr_size.o
nasm -g -felf64 ../input/core/itoa.asm -o itoa.o
# program
nasm -g -felf64 out.asm -o out.o
# tmp
nasm -g -felf64 ../input/util.asm -o util.o
ld -o out gc.o alloc.o str_cmp.o str_len.o arr_size.o itoa.o util.o out.o
gcc -no-pie -nostartfiles -o out gc.o str_cmp.o str_len.o arr_size.o itoa.o out.o