From 7b12eb811ff62d9d14ccb7c152a9821796efe9a5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 24 Apr 2022 03:27:35 +0100 Subject: Replace udis86 with a very small x86 decoder hook_inline() uses the new x86_len() function to get instruction lengths instead of doing full-blown disassembly, which should be a tiny bit quicker, and also removes the next for about 90KiB of lookup tables and such in the final binary. The code-digging logic in demorecord is also rewritten to be opcode-based rather than mnenmonic based. In general, going forward the plan is to always rely on opcodes and thus avoid a bunch of disassembly work every plugin load. udis86 is still in the tree for now to provide dbg_asmdump(), but it's only compiled into debug builds and left out of releases completely. As such, the whole BSD licence statement is also gone from the distribution LICENCE files. There's now also a dbg_toghidra() which spits out a rebased address to look stuff up for proper reverse engineering, which might be more useful than dbg_asmdump() anyway. If nobody ends up using the latter ever again, udis86 could get chucked completely. We'll see. Also shoehorned into this commit are a couple more forgotten copyright year bumps and some general minor cleanup here and there, because I couldn't be bothered wading through all the diff hunks. Oh, and makebindist.bat now makes an effort to make the zip file timestamps predictable/reproducible. That should be a different commit for sure, but oh well too bad. --- tools/mkbindist.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/mkbindist.bat b/tools/mkbindist.bat index 687761d..75d4ea1 100644 --- a/tools/mkbindist.bat +++ b/tools/mkbindist.bat @@ -20,8 +20,11 @@ set name=sst-v%major%.%minor%-BETA-win32 md TEMP-%name% || exit /B copy sst.dll TEMP-%name%\sst.dll || exit /B copy dist\LICENCE.windows TEMP-%name%\LICENCE || exit /B +:: arbitrary dates to make zip deterministic! consider changing on next actual release date! +powershell (Get-Item TEMP-%name%\sst.dll).LastWriteTime = new-object DateTime 2022, 1, 1, 0, 0, 0 +powershell (Get-Item TEMP-%name%\LICENCE).LastWriteTime = new-object DateTime 2022, 1, 1, 0, 0, 0 pushd TEMP-%name% -"%SEVENZIP%" a %name%.zip sst.dll LICENCE || exit /B +"%SEVENZIP%" a -mtc=off %name%.zip sst.dll LICENCE || exit /B move %name%.zip ..\release\%name%.zip popd rd /s /q TEMP-%name%\ || exit /B -- cgit v1.2.3