Skip to content

fix(bridge): repair Phase 0 regressions — --no-undefined-version native + gc-sections difftest fixtures - #131

Merged
zackees merged 3 commits into
mainfrom
fix-no-undefined-version
Sep 16, 2026
Merged

zackees merged 3 commits into
mainfrom
fix-no-undefined-version

Conversation

@zackees

@zackees zackees commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two Phase 0 commits landed on main red, with independent regressions that must be fixed together to go green:

  1. §A / PR refactor(bridge): classify satisfied-by-construction flags correctly (reld#123 Phase 1) #128 dropped --no-undefined-version / --undefined-version from the native parser, so reld: error: unrecognized option(s): --no-undefined-version broke the acceptance leg.
  2. fix(bridge): Phase 0 of the no-gaps gate (reld#123) #125 changed the --gc-sections default from on to off without updating the difftest fixtures, so ~26 DiffIgnore entries became stale.

Fix

  • --no-undefined-version / --undefined-version are native (reld#123 §B). rustc emits --no-undefined-version on every cdylib/dylib/proc-macro link, so routing it pushes all of those off the fast engine (and off the Nix RUNPATH derivation). Accept them as satisfied-by-construction and delete the now-triggerless VersionScriptPolicy capability.
  • Remove stale difftest ignores (section.rodata, section.rodata.alignment, section.data, rel.match_failed.R_X86_64_PLT32, literal-byte-mismatch) that only existed to suppress gc-induced differences. Arch-scoped variants and still-needed ignores are untouched.

Verification

  • cargo test -p reld-core --lib bridge::tests — 45 pass.
  • cargo clippy -p reld-core --all-targets -- -D warnings — clean.

🤖 Generated with Claude Code

zackees and others added 2 commits September 16, 2026 11:12
…eld#123 §B)

The §A reclassification (PR #128) dropped --no-undefined-version /
--undefined-version from the native parser's satisfied-by-construction
list, believing they route to lld. But rustc emits --no-undefined-version
on every cdylib, dylib, and proc-macro link, so routing it pushes all of
those links off the fast native engine (and off the Nix RUNPATH derivation),
which reld#123 §B forbids.

Make them native: accept both flags as satisfied-by-construction (the native
engine has no version-script undefined-symbol tracking, so the check is
trivially satisfied), and delete the now-triggerless VersionScriptPolicy
capability and its route-to-lld arm.

Co-Authored-By: Claude Code <[email protected]>
… (reld#123)

Phase 0 (#125) changed the native engine's --gc-sections default from on to
off, matching ld/lld/mold. That change was landed without updating the
difftest fixtures, so ~26 fixture-level DiffIgnore entries that suppressed
gc-induced .rodata/.data/relocation/byte differences became stale. The
difftest ratchet now fails each unused entry with "is no longer needed".

Remove the stale entries: `section.rodata`, `section.rodata.alignment`,
`section.data`, `rel.match_failed.R_X86_64_PLT32`, and
`literal-byte-mismatch`. Arch-scoped variants (e.g. `... #13 arch=aarch64`)
and still-needed ignores are untouched.

Co-Authored-By: Claude Code <[email protected]>
@zackees zackees changed the title fix(bridge): keep --no-undefined-version native, not routed to lld (reld#123 §B) fix(bridge): repair Phase 0 regressions — --no-undefined-version native + gc-sections difftest fixtures Sep 16, 2026
Phase 0's --gc-sections default flip (#125) made nine mold-suite tests pass
that were previously skipped. The Phase 1 external-test ratchet fails any
skipped test that now passes, so remove them from the skip list:

gc-sections.sh, start-lib.sh, undefined.sh, undefined2.sh, whole-archive.sh
(the five reld#123 Phase 0 names "Passes when --no-gc-sections is passed"),
plus nmagic.sh, section-attributes.sh, symbol-version.sh, symtab.sh.

Co-Authored-By: Claude Code <[email protected]>
@zackees
zackees merged commit 139789c into main Sep 16, 2026
20 of 21 checks passed
@zackees
zackees deleted the fix-no-undefined-version branch September 16, 2026 18:48
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