Repository navigation
fix(relinker): preserve executable exports in macOS output - #7361
Merged
adriadam10 merged 1 commit intoOct 19, 2026
Merged
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 18, 2026
…in macOS output (@RockENZO) Brings the macOS fix from the open upstream pull request into the fork's main ahead of its review, so the port runs with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 18, 2026
…in macOS output (@RockENZO) Includes the open upstream macOS pull request, as the fork's main does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 tasks done
RockENZO
force-pushed
the
codex/macos-executable-exports
branch
from
October 18, 2026 22:31
02c13a6 to
ec5c0dc
Compare
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 19, 2026
…in macOS output (@RockENZO) This branch already carried an earlier head of this PR; the author has pushed newer commits since, and this merge brings the branch up to them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Checked the export population against the dynsym (function/data, absolute, weak, protected, hidden/local skipped), the TLS range validation, the |
12 tasks done
11 tasks done
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 25, 2026
…in macOS output (@RockENZO) Brings the macOS fix from the open upstream pull request into the fork's main ahead of its review, so the port runs with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
macOS executables currently drop the defined dynamic symbols that the pipeline already preserves. A dependent library that imports a function or global from the main executable therefore fails to load, and
dlsymcannot find those exports. The regression fixture converts successfully on currentmain, but running it under Rosetta aborts withsymbol not found in flat namespace '_FixtureData'.Populate the Mach-O executable export trie from the rebuilt dynamic symbol table. Preserve function/data addresses, 64-bit absolute values, weak-definition flags and protected visibility; omit hidden/local symbols. TLS exports use the existing descriptor representation and validate their range. Unsupported attributes/sections, duplicate stripped names and unmapped addresses fail explicitly.
The new test checks the trie on every host and, on macOS, runs the converted x86-64 executable with a small native dependency that imports and calls its function, reads its global and queries weak/absolute/protected exports through
dlsym. This uses no game files or full runtime libraries. It is a loader prerequisite, not a claim that a particular game now runs.Mach-O flag semantics follow Apple's loader.h:
EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE,EXPORT_SYMBOL_FLAGS_WEAK_DEFINITIONandMH_WEAK_DEFINES.Overlap:
tools/pr_overlap.py --branch codex/macos-executable-exports --repo boykopovar/AnyPS5completed with no confirmed duplicate implementation or conflict. It could not compare shared files in already-conflicting PRs #2780, #5021, #6044, #6697, #6879, #6977 and #7332. Manual inspection found CMake registration changes in the first six; #7332 also changes macOS TLS/fixed-base code and does not implement executable exports. #6802 changes the patcher's load-image construction, not this export population. There is no functional dependency on those PRs; whichever lands later may need to rebase.Tested
2026-10-19 revalidation: rebased onto upstream
c820102bd03cc5ec4f3ebd35ccc20570e5d50f5d; headec5c0dcd0cfcdd51cfe4056cfedb50b01ed998e5.git range-diffconfirms the patch is unchanged. Fresh Release relinker-only builds on macOS 27.2 pass all 193 registered tests for arm64 and all 193 for x86-64 under Rosetta. Both runs execute the converted x86-64 export/import anddlsymprobe successfully.input_magicand both macOS loader tests are registered. Conventions and whitespace checks pass. The original baseline evidence below remains historical; no game or full-runtime compatibility is claimed.macOS 27.2, Apple Silicon, AppleClang 21.0.0.21000334, Release, based on
main195d0d0. CMake 4.4.4, Ninja 1.13.2, Python 3.9.6._FixtureDatasymbol.dlsymchecks.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)