initial commit

This commit is contained in:
2024-10-10 16:27:39 +02:00
commit ed4a77766a
5 changed files with 205 additions and 0 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
JC ?= jasminc
CC ?= gcc
MAKE ?= make
JASMIN_ARGS = -protect-calls -return-address-kind=mmx
.PHONY: clean run
all: build
@true
build: build/agent.o
ar -crs build/libagent.a build/agent.o
build/%.o: build/%.S
$(CC) $< -c -o $@
clean:
rm build/* 2> /dev/null || true
$(MAKE) -C syscall clean
build/%.S: src/%.jazz
$(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' $@