diff --git a/docs/tutorials/hipeac2024/introduction/mambo/makefile b/docs/tutorials/hipeac2024/introduction/mambo/makefile index ae93cb79..c47a6fcf 100644 --- a/docs/tutorials/hipeac2024/introduction/mambo/makefile +++ b/docs/tutorials/hipeac2024/introduction/mambo/makefile @@ -9,6 +9,7 @@ #PLUGINS+=plugins/symbol_example.c #PLUGINS+=plugins/memcheck/memcheck.S plugins/memcheck/memcheck.c plugins/memcheck/naive_stdlib.c #PLUGINS+=plugins/follow_exec.c +#PLUGINS+=plugins/hotspot.c PLUGINS+=plugins/tutorial.c OPTS= -DDBM_LINK_UNCOND_IMM @@ -21,6 +22,7 @@ OPTS+=-DLINK_BX_ALT OPTS+=-DDBM_INLINE_HASH OPTS+=-DDBM_TRACES #-DTB_AS_TRACE_HEAD #-DBLXI_AS_TRACE_HEAD #OPTS+=-DCC_HUGETLB -DMETADATA_HUGETLB +OPTS+=-DDBM_TRIBI VERSION?=$(shell git describe --abbrev=8 --dirty --always || echo '\') CFLAGS+=-D_GNU_SOURCE -g -std=gnu99 -O2 -Wunused-variable @@ -30,7 +32,7 @@ LDFLAGS+=-static -ldl LIBS=-lelf -lpthread -lz HEADERS=*.h makefile INCLUDES=-I/usr/include/libelf -I. -SOURCES= common.c dbm.c traces.c syscalls.c dispatcher.c signals.c util.S +SOURCES= common.c dbm.c traces.c syscalls.c dispatcher.c util.S traces_common.c SOURCES+=api/helpers.c api/plugin_support.c api/branch_decoder_support.c api/load_store.c api/internal.c api/hash_table.c SOURCES+=elf/elf_loader.o elf/symbol_parser.o @@ -44,6 +46,7 @@ ifeq ($(findstring arm, $(ARCH)), arm) SOURCES += arch/aarch32/dispatcher_aarch32.S arch/aarch32/dispatcher_aarch32.c SOURCES += arch/aarch32/scanner_t32.c arch/aarch32/scanner_a32.c SOURCES += api/emit_arm.c api/emit_thumb.c + SOURCES += signals.c endif ifeq ($(ARCH),aarch64) HEADERS += api/emit_a64.h @@ -52,6 +55,18 @@ ifeq ($(ARCH),aarch64) SOURCES += arch/aarch64/dispatcher_aarch64.S arch/aarch64/dispatcher_aarch64.c SOURCES += arch/aarch64/scanner_a64.c SOURCES += api/emit_a64.c + SOURCES += signals.c +endif +ifeq ($(ARCH), riscv64) + HEADERS += api/emit_riscv.h + LDFLAGS += -Wl,-Ttext-segment=$(or $(TEXT_SEGMENT),0x7f000000) + PIE += pie/pie-riscv-field-decoder.o + PIE += pie/pie-riscv-encoder.o + PIE += pie/pie-riscv-decoder.o + SOURCES += arch/riscv/dispatcher_riscv.S arch/riscv/dispatcher_riscv.c + SOURCES += arch/riscv/scanner_riscv.c + SOURCES += api/emit_riscv.c + SOURCES += arch/riscv/riscv_traces.c endif ifdef PLUGINS