From c11e4da33e9878bdffe883c52a39be9bca8a2453 Mon Sep 17 00:00:00 2001 From: szapp Date: Tue, 4 Jun 2024 11:45:21 +0200 Subject: [PATCH] Fix imports in loader to link Ninja --- Makefile | 4 ++-- src/dll/BugslayerUtil.asm | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6d5daa..4f906e9 100644 --- a/Makefile +++ b/Makefile @@ -244,13 +244,13 @@ $(SETUP) : $(LOADER) $(TARGET) LICENSE $(SETUPSCR) $(SETUPINI) $(LOADER) : $(LOADER_OBJ) $(TARGET) @$(call mkdir,$(BUILDDIR)) - $(LINKER) $(FLAGS_L) /fo $@ $^ $(LOADER_SYSDEP) + $(LINKER) $(FLAGS_L) /fo $(call FixPath,$@) $^ $(LOADER_SYSDEP) $(REPRO) $@ $(PATCHREPRO) $(call FixPath,$@) $(TARGET) : $(OBJ) $(RSC) @$(call mkdir,$(BUILDDIR)) - $(LINKER) $(FLAGS_L) /fo $@ $^ $(SYSDEP) + $(LINKER) $(FLAGS_L) /fo $(call FixPath,$@) $^ $(SYSDEP) $(REPRO) $@ $(PATCHREPRO) $(call FixPath,$@) diff --git a/src/dll/BugslayerUtil.asm b/src/dll/BugslayerUtil.asm index 9102193..244ba72 100644 --- a/src/dll/BugslayerUtil.asm +++ b/src/dll/BugslayerUtil.asm @@ -83,6 +83,9 @@ DllMain: mov eax, DWORD 0x1 ret 0xC verifyStackoffset +.reference: ; Never reached + call Ninja ; Force import during linking + ret ; Load library on very first call, after that jump to function directly