Skip to content

refactor(il2cpp): use memkit_xdl wrappers instead of raw xdl calls#2

Merged
HanSoBored merged 1 commit intomasterfrom
refactor/il2cpp-use-xdl-wrapper
Apr 8, 2026
Merged

refactor(il2cpp): use memkit_xdl wrappers instead of raw xdl calls#2
HanSoBored merged 1 commit intomasterfrom
refactor/il2cpp-use-xdl-wrapper

Conversation

@HanSoBored
Copy link
Copy Markdown
Owner

Summary

Refactored src/il2cpp.c to use the project's MemKit xDL wrapper API instead of calling raw xDL functions directly.

Changes

File Change
src/il2cpp.c Removed #include "xdl.h", replaced 4 xdl_* calls → memkit_xdl_*
include/memkit.h Added 6 XDL flag constants for public consumption

Details

  • xdl_open()memkit_xdl_open() — 2 call sites (lines 26, 62)
  • xdl_sym()memkit_xdl_sym() — 1 call site (line 71)
  • xdl_dsym()memkit_xdl_dsym() — 1 call site (line 96)
  • Added to memkit.h: XDL_DEFAULT, XDL_TRY_FORCE_LOAD, XDL_ALWAYS_FORCE_LOAD, XDL_NON_SYM, XDL_FULL_PATHNAME, XDL_DI_DLINFO

Why

This enforces a clean architectural boundary where il2cpp.c only depends on memkit.h, not the underlying xDL library directly. All consumers of the library now get a single entry point (memkit.h) without needing to pull in xDL headers.

Verification

  • ✅ Build passes (make clean && make — zero errors, zero warnings)
  • ✅ No behavioral change (wrapper is a thin pass-through with identical signatures)
  • ✅ Code review passed (8/8 checklist items cleared)

- Replace xdl_open() with memkit_xdl_open() (2 call sites)
- Replace xdl_sym() with memkit_xdl_sym()
- Replace xdl_dsym() with memkit_xdl_dsym()
- Remove direct #include "xdl.h" from il2cpp.c
- Export XDL flag constants (XDL_DEFAULT, XDL_TRY_FORCE_LOAD,
  XDL_ALWAYS_FORCE_LOAD, XDL_NON_SYM, XDL_FULL_PATHNAME, XDL_DI_DLINFO)
  in memkit.h so consumers don't need xdl.h

This enforces a clean architectural boundary where il2cpp.c only
depends on memkit.h, not the underlying xDL library directly.
@HanSoBored HanSoBored merged commit 89f7854 into master Apr 8, 2026
1 check passed
@HanSoBored HanSoBored deleted the refactor/il2cpp-use-xdl-wrapper branch April 8, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant