Repository navigation
fix(bridge): Phase 0 of the no-gaps gate (reld#123) - #125
Merged
Merged
Conversation
Start correcting the flag-classification model surfaced by the adversarial audit in #123: - Case-sensitive `-x` vs `-X`: `-X` is `--discard-locals` (a native default) and must not route to lld as `DiscardAll`. - `-plugin-opt` (rustc `-C linker-plugin-lto` through clang) is now an `Lto` trigger, so bitcode routes to lld even with no `-plugin`/`-flto`. - `--fix-cortex-a53-835769` is no longer warned-and-dropped: lld rejects it too, so it is a loud "unrecognized option" error. - Default `--gc-sections` off, matching lld/ld/mold, so rustc's `-C link-dead-code` (which omits `--gc-sections`) keeps the requested code. Refs: #123. Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
zackees
added a commit
that referenced
this pull request
Sep 16, 2026
… (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
added a commit
that referenced
this pull request
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
added a commit
that referenced
this pull request
Sep 16, 2026
…ve + gc-sections difftest fixtures (#131) * fix(bridge): keep --no-undefined-version native, not routed to lld (reld#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]> * fix(difftest): drop stale ignores from the gc-sections default change (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]> * test(external): un-skip mold tests that now pass under gc-sections-off 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]> --------- Co-authored-by: Claude Code <[email protected]>
9 of 31 tasks
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.
Summary
Phase 0 of the reld#123 no-gaps gate — "stop the bleeding" after the adversarial audit found the prior
#121escalation was a fiction (it routed--start-group/--nostdlib/--sort-common/--statsto lld, which also ignores them, and made every+crt-staticlink leave the native engine). That escalation was already reverted in #124.Changes
-X(--discard-locals, native default) no longer routes to lld asDiscardAll; only-x/--discard-alldoes.-plugin-opt→ Lto — rustc-C linker-plugin-ltothrough clang emits-plugin-opt=…with no-plugin/-flto; bitcode now routes to lld's real LTO.--fix-cortex-a53-835769→ loud error — lld rejects it too, so it's no longer silently warned-and-dropped.--gc-sectionsdefaults off — matches lld/ld/mold; rustc-C link-dead-code(which omits--gc-sections) now keeps the requested code.Tests
discard_all_is_case_sensitive_x_not_X,plugin_opt_routes_to_lld_for_lto,gc_sections_defaults_off,fix_cortex_a53_835769_is_a_loud_error.Refs: #123.
🤖 Generated with Claude Code