Skip to content

Port open upstream relinker fixes (#4340, #4802, #4501) - #439

Merged
RINNECODER merged 5 commits into
mainfrom
upstream/relinker-prs
Oct 13, 2026
Merged

RINNECODER merged 5 commits into
mainfrom
upstream/relinker-prs

Conversation

@RINNECODER

Copy link
Copy Markdown
Owner

Follow-up to #436. Refs #415.

Ported (patches, upstream PRs still open)

Skipped

Tests

  • -DANYPS5_RELINKER_ONLY=ON -DCMAKE_OSX_ARCHITECTURES=x86_64, full build + ctest: 116/116 passed (includes guest_gnu_hash, output_collisions, guest_module_directories).
  • Rosetta libs config (-DANYPS5_ROSETTA_LIBS=ON, x86_64): rosetta_cpuid_tests builds and passes. No new codegen sources, so tools/rosetta/tests/CMakeLists.txt is unchanged.

🤖 Generated with Claude Code

RINNECODER and others added 4 commits October 12, 2026 20:05
Ported from boykopovar/AnyPS5 PR boykopovar#4340 (author @ArjenS-LA), applied as a patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from boykopovar/AnyPS5 PR boykopovar#4802 (author @ArjenS-LA), applied as a patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from boykopovar/AnyPS5 PR boykopovar#4501 (author @devavijitsingh), applied as a patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck runs before registries are written

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T01:11:49.038631Z 4f84665 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3956ae1-59ea-4107-900b-5b94735a5747
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f846654c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread core/relinker/main.cpp
Comment on lines +113 to +114
if (firstPath == secondPath) return true;
if (std::filesystem::exists(first) && std::filesystem::exists(second)) return SameOutputFile(first, second);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve dangling symlinks when checking output collisions

When one planned output is a dangling symlink to another planned output that does not exist yet, weakly_canonical leaves the symlink unresolved and exists is false for both paths, so this check reports no collision. For example, with output.exe symlinked to the absent windows-diagnostics-imports.txt, diagnostics are written first and the later executable write follows the symlink and silently overwrites them. Account for dangling symlink targets before deciding the destinations are distinct.

Useful? React with 👍 / 👎.

Comment thread core/relinker/main.cpp
const auto secondPath = std::filesystem::weakly_canonical(second);
if (firstPath == secondPath) return true;
if (std::filesystem::exists(first) && std::filesystem::exists(second)) return SameOutputFile(first, second);
#ifdef _WIN32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check case-insensitive filesystems outside Windows

On a case-insensitive POSIX filesystem, such as the default macOS APFS configuration, two nonexistent output paths that differ only by case remain unequal after weakly_canonical, while the case-folding and sensitivity probe are compiled only for Windows. Thus --windows-diagnostics with an executable named WINDOWS-DIAGNOSTICS-IMPORTS.TXT, or case-varied guest registry names, passes this check and later writes both artifacts to the same file. Apply the filesystem-sensitivity check independently of the host OS.

Useful? React with 👍 / 👎.

@RINNECODER
RINNECODER merged commit 3628e68 into main Oct 13, 2026
5 checks passed
@RINNECODER
RINNECODER deleted the upstream/relinker-prs branch October 13, 2026 01:15
RINNECODER added a commit that referenced this pull request Oct 13, 2026
Brings in the relinker fixes (#436, #439). No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj
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