Skip to content

refactor(bridge): classify satisfied-by-construction flags correctly (reld#123 Phase 1) - #128

Merged
zackees merged 1 commit into
mainfrom
phase1-reclassify
Sep 16, 2026
Merged

zackees merged 1 commit into
mainfrom
phase1-reclassify

Conversation

@zackees

@zackees zackees commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

First sub-step of reld#123 Phase 1: correct the classification of the flags the audit called out in §A.

Changes

  • Rename SILENTLY_IGNORED_FLAGS → SATISFIED_BY_CONSTRUCTION_FLAGS and document that --start-group/--end-group, --nostdlib, --sort-common, --stats are satisfied by the native engine's unconditional behavior, not silently dropped.
  • Remove --fatal-warnings, --color-diagnostics, --no-undefined-version, --undefined-version from the list — those already route to lld via the bridge, and now fail loudly under --engine=reld instead of being silently accepted.

Tests

192 reld-core lib tests pass; clippy (--all-targets) and fmt clean.

Refs: #123.

🤖 Generated with Claude Code

…(reld#123 §A)

The four flags `--start-group`/`--end-group`, `--nostdlib`, `--sort-common`,
`--stats` are satisfied by the native engine's unconditional behavior (cycle
resolution, no built-in search paths, no common-symbol ordering, no stats),
not "silently ignored". Rename the constant and drop the four already-routed
flags (`--fatal-warnings`, `--color-diagnostics`, `--no-undefined-version`,
`--undefined-version`) from the list — those route to lld, and now fail loudly
under `--engine=reld` rather than being silently accepted.

Refs: #123.

Co-Authored-By: Claude Code <[email protected]>
@zackees
zackees merged commit 41db49f into main Sep 16, 2026
16 of 17 checks passed
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]>
@zackees
zackees deleted the phase1-reclassify branch November 5, 2026 05:51
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