use later jasmin version that can issue proper syscalls and can generate asm code without ret
This commit is contained in:
13
Makefile
13
Makefile
@@ -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' $@
|
||||
|
||||
Reference in New Issue
Block a user