Fixes for delinking

Fixes delink failures in Action.obj and ActSequence.obj.

Some missing data types have been added to each corresponding header
file, and entries have been added to the symbol table to fix errors from
undefined types.  The mangling script has also been amended to handle
method pointers as they're currently imported into Ghidra (which are
missing the calling convention, and likely behind a typedef).
This commit is contained in:
KeybadeBlox 2026-05-02 20:34:05 -04:00
parent f50945266c
commit 20fecdd5fb
6 changed files with 74 additions and 8 deletions

View file

@ -432,7 +432,12 @@ public class MSVC7Mangle extends GhidraScript {
case DoubleDataType x -> "N";
case LongDoubleDataType x -> "O";
case Pointer p -> "P" +
(p.getDataType() instanceof FunctionSignature f ? (
((
p.getDataType() instanceof FunctionSignature || (
p.getDataType () instanceof TypeDef d &&
d.getBaseDataType() instanceof FunctionSignature
)
) ? (
classNamespace.isPresent() ? "8" : "6"
) : "A"
) + mangleType(p.getDataType(), classNamespace, dict, loc);
@ -519,7 +524,10 @@ public class MSVC7Mangle extends GhidraScript {
List<DataType> args = Arrays.stream(f.getArguments())
.map(ParameterDefinition::getDataType)
.toList();
args = args.subList(isMethodPtr ? 1 : 0, args.size());
if (
isMethodPtr &&
f.getCallingConventionName().equals("__thiscall")
) args = args.subList(1, args.size());
final ArrayList<DataType> argDict = new ArrayList<>();