use later jasmin version that can issue proper syscalls and can generate asm code without ret

This commit is contained in:
2024-08-23 10:58:24 +02:00
parent 36ae72a8d9
commit b7af39ff80
7 changed files with 28 additions and 205 deletions

View File

@@ -2,13 +2,15 @@ JC ?= jasminc
CC ?= gcc
MAKE ?= make
JASMIN_ARGS = -protect-calls -return-address-kind mmx
.PHONY: clean run
all: build
@true
build: build/agent.o syscall/jasmin_syscall.o
ar -crs build/libagent.a build/agent.o syscall/jasmin_syscall.o
build: build/agent.o
ar -crs build/libagent.a build/agent.o
build/%.o: build/%.S
$(CC) $< -c -o $@
@@ -18,7 +20,6 @@ clean:
$(MAKE) -C syscall clean
build/%.S: src/%.jazz
$(JC) $< -o $@
syscall/jasmin_syscall.o: syscall/jasmin_syscall.c syscall/jasmin_syscall.h
$(MAKE) -C syscall
$(JC) $(JASMIN_ARGS) $< -o $@
# remove the remaining ret calls to make sure that we don't execute any return. Those returns should not be called anyways due to the infinit loop
sed -i 's/ret/hlt/g' $@