diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2024-12-19 13:36:42 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-01-09 17:01:53 +0900 |
commit | c6ac2488c9bfac7db4d5efdcac7a85449ef15d37 (patch) | |
tree | eefde3ba3efa1b1c04cea41b04ec476d24277d3b | |
parent | e7551939f40f3097bb6a358a48e5fc24825d7369 (diff) | |
download | loftix-c6ac2488c9bfac7db4d5efdcac7a85449ef15d37.tar.gz |
Update E9Patch
-rw-r--r-- | loftix/patching.scm | 6 | ||||
-rw-r--r-- | patches/e9patch-check.patch | 36 | ||||
-rw-r--r-- | patches/e9patch-zydis-4.1.0.patch (renamed from patches/e9patch-devendor.patch) | 35 |
3 files changed, 38 insertions, 39 deletions
diff --git a/loftix/patching.scm b/loftix/patching.scm index 26b25e2..71d30fa 100644 --- a/loftix/patching.scm +++ b/loftix/patching.scm @@ -30,7 +30,7 @@ #:use-module (guix packages)) (define-public e9patch - (let ((commit "840358a4aeeeb397fd10a34ae815b5bd33b73b19") + (let ((commit "a6d900b997942b124c2cdc9e164500052bbaec17") (revision "0")) (package (name "e9patch") @@ -42,11 +42,11 @@ (commit commit))) (sha256 (base32 - "04an37kny9aznizyy0l5djx1jvlgfn5k1z2kcva9bv3dz6ljhx99")) + "03gaf8scsmmfaxsmi5826ixnc5r7j6xaj0bq2fif633s82r7f7cg")) (file-name (git-file-name name version)) (patches (search-patches ;; https://github.com/GJDuck/e9patch/pull/94 - "patches/e9patch-devendor.patch" + "patches/e9patch-zydis-4.1.0.patch" ;; https://github.com/GJDuck/e9patch/pull/92 "patches/e9patch-check.patch" ;; https://github.com/GJDuck/e9patch/pull/95 diff --git a/patches/e9patch-check.patch b/patches/e9patch-check.patch index f149b78..f679db7 100644 --- a/patches/e9patch-check.patch +++ b/patches/e9patch-check.patch @@ -7,18 +7,40 @@ Date: 2024-11-18 14:06:32 +0900 The C++ script is rewritten in Makefile and shell script for concision. diff --git a/Makefile b/Makefile -index 1218c65d1818..6c786bb91a1d 100644 +index 754f5210b004..272e7bb4866f 100644 --- a/Makefile +++ b/Makefile -@@ -181,3 +181,8 @@ tool.sanitize: $(E9TOOL_OBJS) $(E9TOOL_LIBS) - $(CXX) $(CXXFLAGS) $(E9TOOL_OBJS) $(E9TOOL_LIBS) -o e9tool \ - $(E9TOOL_LDFLAGS) +@@ -1,4 +1,4 @@ +-.PHONY: all clean install dev release debug sanitize ++.PHONY: all clean install check dev release debug sanitize check-debug + .SECONDEXPANSION: -+check: e9tool + ######################################################################### +@@ -67,6 +67,7 @@ clean: + $(MAKE) -C contrib/zydis clean + rm -rf $(E9PATCH_OBJS) $(E9TOOL_OBJS) e9patch e9tool \ + src/e9patch/e9loader_*.c e9loader_*.o e9loader_*.bin ++ $(MAKE) -C test/regtest clean-check + + src/e9patch/e9loader_elf.c: src/e9patch/e9loader_elf.cpp + $(CXX) -std=c++11 -Wall -fno-stack-protector -Wno-unused-function -fPIC \ +@@ -83,6 +84,9 @@ src/e9patch/e9loader_pe.c: src/e9patch/e9loader_pe.cpp + src/e9patch/e9elf.o: src/e9patch/e9loader_elf.c + src/e9patch/e9pe.o: src/e9patch/e9loader_pe.c + ++check: all + $(MAKE) -C test/regtest + -+.PHONY: all clean install check\ -+ release debug sanitize tool tool.debug tool.sanitize + install: all + install -d "$(DESTDIR)$(PREFIX)/bin" + install -m 755 e9patch "$(DESTDIR)$(PREFIX)/bin/e9patch" +@@ -165,3 +169,6 @@ debug: dev + + sanitize: CXXFLAGS += -O0 -g -fsanitize=address + sanitize: dev ++ ++check-debug: debug ++ $(MAKE) -C test/regtest diff --git a/test/regtest/Makefile b/test/regtest/Makefile index 992b1bc40984..9b29e0f72408 100644 --- a/test/regtest/Makefile diff --git a/patches/e9patch-devendor.patch b/patches/e9patch-zydis-4.1.0.patch index e9ee292..9ce42d6 100644 --- a/patches/e9patch-devendor.patch +++ b/patches/e9patch-zydis-4.1.0.patch @@ -1,32 +1,9 @@ -diff --git a/Makefile b/Makefile -index 1218c65d1818..0ebdf24ea259 100644 ---- a/Makefile -+++ b/Makefile -@@ -37,10 +37,7 @@ E9TOOL_OBJS=\ - E9TOOL_LIBS=\ - contrib/zydis/libZydis.a \ - contrib/libdw/libdw.a --E9TOOL_CXXFLAGS=\ -- -I src/e9tool/ -Wno-unused-function \ -- -I contrib/zydis/include/ \ -- -I contrib/zydis/dependencies/zycore/include/ -+E9TOOL_CXXFLAGS= -I src/e9tool/ -Wno-unused-function - E9TOOL_LDFLAGS=\ - -Wl,--dynamic-list=src/e9tool/e9tool.syms \ - -ldl -lz -@@ -52,9 +49,9 @@ E9TOOL_LDFLAGS=\ - all: e9tool e9patch - - e9tool: CXXFLAGS += -O2 -DSYSTEM_LIBDW $(E9TOOL_CXXFLAGS) --e9tool: contrib/zydis/libZydis.a $(E9TOOL_OBJS) -- $(CXX) $(CXXFLAGS) $(E9TOOL_OBJS) contrib/zydis/libZydis.a -o e9tool \ -- $(E9TOOL_LDFLAGS) -ldw -+e9tool: $(E9TOOL_OBJS) -+ $(CXX) $(CXXFLAGS) $(E9TOOL_OBJS) -o e9tool \ -+ $(E9TOOL_LDFLAGS) -ldw -lZydis - strip e9tool - - e9patch: CXXFLAGS += -O2 +commit c02dd23b12fd687a041ab3b872b3f989cd1342dc +Author: Nguyễn Gia Phong <cnx@loang.net> +Date: 2024-11-18 15:13:17 +0900 + + Make compatible with Zydis 4.1.0 + diff --git a/src/e9tool/e9x86_64.cpp b/src/e9tool/e9x86_64.cpp index 6a7f5cff3692..03eb3a41dd66 100644 --- a/src/e9tool/e9x86_64.cpp |