Repository navigation
Conversation
The iOS loader reads the game's embedded module sections (__TEXT,__dm<mod>x0, __DM<mod>W,__img, __TEXT,__dm<mod>x1 and the packed NRO sections) from a fixed &_mh_execute_header, so they must be linked into the app executable. An embedder that links them into another image of the app (a framework it dlopen()s from its signed bundle) had no way to say so. dm_set_game_image_header() (loader_image.h) names that image's mach header. IMAGE_MH, used by map_image() and nro_pieces(), reads it, and unset it is still &_mh_execute_header, so every existing build behaves exactly as before. The host's own tables (__DATA,swforce in force_init(), __DATA,swhle in hle.c) stay the executable's. Nothing calls the setter in this change. Checked: make -C dm/host/tests GAME=010015100B514000 run (includes t_nro and t_symbols, which compile loader.c), and lint_python.py (no Python touched, 0 new findings).
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 30, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
2 tasks done
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 30, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
4 of 5 tasks
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 31, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 31, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 31, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
v0lumehi
added a commit
to LNPANDY/NX2Apple
that referenced
this pull request
Oct 31, 2026
The loader's settable image header is forwarded as seedds/nxnative#729. The game framework, its build, tests and env switch row are fork-only until the runtime profile (seedds/nxnative#492) is upstream, because the framework carries profile.tsv and main.m sets DM_PROFILE.
seedds
added a commit
that referenced
this pull request
Nov 2, 2026
…#729) The iOS loader reads the game's embedded module sections from a fixed &_mh_execute_header, so they must be linked into the app executable. An app that links them into another image, a framework it dlopens from its signed bundle, had no way to say so. dm_set_game_image_header (front.h, iOS only) names that image's mach header, before dm_host_preload_start. map_image and nro_pieces read it, and unset it is the executable, so every existing build behaves as before. Nothing in this repository calls it; docs/frontends.md lists it. Co-authored-by: LNPANDY <[email protected]> Co-authored-by: v0lumehi <[email protected]>
Owner
|
Thanks. Landed as 694ea91, with @LNPANDY and @v0lumehi as co-authors. The name and the behaviour are the same, with these changes:
|
Closed
3 tasks done
2 of 4 tasks
Fbenhaddou
pushed a commit
to Fbenhaddou/NX2Apple
that referenced
this pull request
Nov 2, 2026
Drop 0045 and 0052 (landed upstream as seedds/nxnative#729 and LNPANDY#742), refresh 0053 and the route C patches for the setter now declared in front.h, mark the runtime profile patches as declined in seedds/nxnative#492, regenerate the gallery.
Know-It-All-Brother
pushed a commit
to Know-It-All-Brother/nxnative
that referenced
this pull request
Nov 9, 2026
…seedds#729) The iOS loader reads the game's embedded module sections from a fixed &_mh_execute_header, so they must be linked into the app executable. An app that links them into another image, a framework it dlopens from its signed bundle, had no way to say so. dm_set_game_image_header (front.h, iOS only) names that image's mach header, before dm_host_preload_start. map_image and nro_pieces read it, and unset it is the executable, so every existing build behaves as before. Nothing in this repository calls it; docs/frontends.md lists it. Co-authored-by: LNPANDY <[email protected]> Co-authored-by: v0lumehi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The iOS loader reads the game's embedded module sections from a fixed
&_mh_execute_header(map_image()andnro_pieces()indm/host/loader.c), so they have to be linked into the app executable. An embedder that links them into another image of the app, for example a framework itdlopens from its signed bundle, has no way to say so.This adds
dm_set_game_image_header(const void *mh)(dm/host/loader_image.h).IMAGE_MHreads it, and unset it is still&_mh_execute_header, so every existing build behaves exactly as before. The host's own tables (__DATA,swforceinforce_init(),__DATA,swhleinhle.c) stay the executable's. Nothing calls the setter in this PR.It is the loader half of an opt-in
DM_FRAMEWORK=1packaging mode (the game's modules inDmIOS.app/Frameworks/DmGame.framework, which the appdlopens). That mode is carried in LNPANDY/NX2Apple#144 for now, and it comes here as its own PR once the run time profile (#492) is settled, because it ships the profile inside the framework. The setter is useful on its own, so it comes first. The change is by @LNPANDY, taken over from that PR.Checked
make -C dm/host/tests GAME=010015100B514000 runpasses, includingt_nroandt_symbols, which compileloader.c.python3 dm/tools/lint_python.py: 0 new findings (no Python touched).compile_check.pyin the follow-up PR.Docs