KeybadeBlox
b95a664688
Add ehdata.h
...
Bunch of spooky low-level exception handling stuff needed to delinking
working again.
2026-03-20 23:29:39 -04:00
KeybadeBlox
709bbf9a54
Default to __cdecl for name mangling
...
It's definitely ideal for everything to be declared explicitly, but it
would require either manual intervention or a new dedicated script to do
this for typedefs (that aren't methods), so we'll do this as the least
worst option.
2026-03-20 23:26:20 -04:00
KeybadeBlox
a2b777d666
Disable function thunking when importing
...
Thunked functions can confuse the delinker extension into thinking that
multiple symbols have the same name and lead to delinking failures (with
no diagnostic, conveniently).
2026-03-20 23:25:19 -04:00
KeybadeBlox
ac40f3e8cf
Update symbol table
2026-03-20 23:24:55 -04:00
KeybadeBlox
69d5bd1dbe
Summarize unrecognized types in EnhancedImport
...
Helps a little to debug things.
2026-03-20 20:10:16 -04:00
KeybadeBlox
98d88cc212
Support earlier Java releases
...
Existing code was written for Java 25, which is more recent than many
people have on hand. The modified scripts appear to run well on Java
21.
2026-03-20 13:20:51 -04:00
KeybadeBlox
c713c2c8ea
Fix permissions on symbol table
2026-03-20 10:08:51 -04:00
KeybadeBlox
6b12d397ff
Update headers in make_header.sh
...
Forgot to change after Std.hpp got turned into stddef.h.
2026-03-20 08:27:08 -04:00
KeybadeBlox
cbd63865e2
Rename Smilebit library to MUSASHI
...
Strings in the .rdata portion of the Smilebit in-house library code
suggest that this was its name, with its contents having names beginning
with an M (whence MMATRIX, for example).
2026-02-22 10:37:59 -05:00
KeybadeBlox
9cfd8b5bf3
Delink/begin decompiling entry point
...
That is, xapi0.obj, which has been renamed from crt0.obj because it
appears to be part of the Xbox libraries rather than the C runtime.
2026-02-20 21:50:00 -05:00
KeybadeBlox
9b6c91a12e
Prevent repeated name mangling
...
A symbol could be encountered more than once in headless mode if it
appeared in the body of a function. The mangler script now tracks which
symbols have been seen to avoid this.
2026-02-20 21:44:43 -05:00
KeybadeBlox
aac010eb71
Add PlayerCharId type
2026-02-19 21:16:11 -05:00
KeybadeBlox
73b59a95cd
Fix main() detection in mangling script
2026-02-19 21:06:17 -05:00
KeybadeBlox
522bf8be7f
Fix static init/exit section names in objects.csv
2026-02-18 20:42:45 -05:00
KeybadeBlox
0b10a02ad7
Fix whitespace in Ghidra export script output
...
Functions with no arguments had a trailing tab.
2026-02-18 20:41:51 -05:00
KeybadeBlox
e0313fa0ba
Add class fixup Ghidra script
2026-02-18 20:24:43 -05:00
KeybadeBlox
3c4f0e72b8
Miscellaneous Ghidra script tweaks
...
No behavioural changes.
2026-02-18 18:18:24 -05:00
KeybadeBlox
c020c2e247
jsrf.h scalar deleting destructors return void *
...
They previously returned a pointer to the class type, but this isn't
accurate to the signature indicated by MSVC's name mangling.
2026-02-18 18:15:25 -05:00
KeybadeBlox
fd6815ae42
Complete Ghidra symbol import script
2026-02-17 22:30:10 -05:00
KeybadeBlox
92179ea9bd
Add C symbol support to name mangling Ghida script
2026-02-17 20:19:14 -05:00
KeybadeBlox
5d22c39db6
Finish Ghidra data symbol import
...
Function import still remains.
2026-02-16 21:38:28 -05:00
KeybadeBlox
0922356a40
Begin Ghidra symbol import script
2026-02-16 00:21:55 -05:00
KeybadeBlox
e0c9fc4c83
Use enhanced for loops in Ghidra mangler script
2026-02-16 00:21:22 -05:00
KeybadeBlox
1e8ae0f72f
Finish Ghidra symbol export script
2026-02-16 00:20:57 -05:00
KeybadeBlox
43f4d10461
Begin enhanced export Ghidra script
2026-02-14 23:02:55 -05:00
KeybadeBlox
c38d9b5628
Tiny steps towards implementing C runtime
2026-02-14 12:34:28 -05:00
KeybadeBlox
ccd2cd37a5
Defend against spurious references during mangling
...
Ghidra sometimes identifies random numbers as pointers, which trips up
our mangler script when it encounters them as they generally have no
type information. We now use heuristics to ignore such references.
2026-02-13 23:43:35 -05:00
KeybadeBlox
d372c17094
Miscellaneous name mangling improvements
...
Improved error reporting, skipping undesirable symbols like jump tables,
skipping special symbols like intrinsics, etc.
2026-02-12 21:15:52 -05:00
KeybadeBlox
78127e64ef
Arguments via environment variables in delink.sh
...
It was really annoying having to type all that in every time.
2026-02-12 16:16:07 -05:00
KeybadeBlox
05b4da2f78
Mangle referenced symbols in mangling script
...
This produces correct symbol names in disassembly in objdiff.
2026-02-12 00:36:40 -05:00
KeybadeBlox
0e84f9ab1f
Refine for virtual method check in mangling script
...
We used the flimsy heuristic of a reference from non-executable memory
to try to guess at whether a reference was a vtable, but now we just
check whether it's been named as a vtable.
2026-02-11 21:14:46 -05:00
KeybadeBlox
53b0e82417
Include headless demangling in delink.sh
...
This means we get delinked objects with proper mangled names matching
our recompiled files.
2026-02-11 20:23:26 -05:00
KeybadeBlox
55046bf009
Better handle undefined types in mangling script
2026-02-11 20:17:22 -05:00
KeybadeBlox
e9b0c3c6bc
Complete mangler script
...
Now to hook it up to the delinker script.
(I totally accidentally said "demangling" in the last commit)
2026-02-11 00:46:33 -05:00
KeybadeBlox
febf9fc172
Finish function demangling
...
Data demangling should be much easier.
2026-02-10 00:06:29 -05:00
KeybadeBlox
576a60d331
Mostly finish function name mangling
...
Still need to do function pointers.
2026-02-07 22:08:02 -05:00
KeybadeBlox
76e39fdd27
Begin Ghidra mangling script
...
Looks like we'll be writing our own Ghidra scripts. At least these
should enable pretty thorough sharing of work and decent UX.
2026-02-05 22:31:36 -05:00
KeybadeBlox
35c8844529
Move everything else to ghidra/ directory
...
The only stuff left in delink/ was also for using with Ghidra, so we may
as well also put it in ghidra/.
2026-02-04 20:01:06 -05:00
KeybadeBlox
63002e0f08
Add data type import for Ghidra
2026-02-04 19:52:12 -05:00