Skip to content

Inventory: native engine gaps (routed to lld / ignored / unsupported) #120

Open

Description

@zackees

Inventory: every way the native engine is deficient

The native engine (reld, the wild fork) is deliberately narrow — it links ordinary ELF fast and owns one capability (NativeControl). Everything else is either routed to the bundled lld bridge, silently ignored, warned, or rejected. This is the complete list as of this writing, sourced from the code.

1. Capabilities routed to ld.lld (native engine does not implement)

crates/reld-core/src/bridge.rs — NATIVE_RELD_CAPABILITIES = [NativeControl]; these seven Capability values are the native gaps that BR-6 routes to the ELF lld engine:

  1. LTO — ThinLTO / FullLTO. Native engine owns zero LTO codegen.
  2. ICF — identical code folding (--icf).
  3. Discard-all — -x / --discard-all (discarding local symbols).
  4. Fatal warnings — --fatal-warnings.
  5. Color diagnostics — --color-diagnostics.
  6. Version-script undefined-symbol policy — --undefined-version / --no-undefined-version.
  7. Cortex-A53 erratum 843419 fixups.

2. Whole-format gaps (native is ELF-only)

3. Silently-ignored flags (semantics dropped, no warning)

SILENTLY_IGNORED_FLAGS in args/elf.rs — accepted as no-ops, so the requested behavior is silently lost:

  • --start-group / --end-group (cycle resolution not needed)
  • --nostdlib (TODO: no built-in search paths yet)
  • --no-undefined-version (TODO)
  • --fatal-warnings (TODO)
  • --color-diagnostics
  • --undefined-version (TODO)
  • --sort-common
  • --stats
  • short -( / -) (group delimiters)

4. Flags ignored in the native path (and delegated to lld)

IGNORED_FLAGS — --fix-cortex-a53-835769, --fix-cortex-a53-843419, --discard-all, -x. The native engine does not act on these itself; they fall through to the capability routing.

5. Unsupported flag values (warned or rejected)

  • -m <emulation> other than the six supported targets (elf_x86_64, elf_x86_64_sol2, aarch64elf, aarch64linux, elf64lriscv, elf64loongarch, elf64lppc) → hard error ("not yet supported").
  • Unknown -z <option> values → warned and dropped.
  • --pack-dyn-relocs=android / non-relr values → warned and dropped.
  • --icf=<value> values other than the routable one → warned and dropped.
  • --sort-section=<value> other than name / alignment → warned and dropped.

6. Deferred / explicit non-goals

  • Native (Thin)LTO — stretch goal, not shipped; the product LTO path is the lld bridge.
  • PGO / BOLT interaction — out of scope for the native engine.
  • Cross-machine / cross-toolchain reproducible builds — not a release guarantee.
  • Native Windows & macOS backends — "future work", bridge-only today.
  • macOS raw throughput — ld_prime is 1.4–2× faster than ld64.lld; the macOS pitch is incremental + open implementation, not speed.

Net

The native engine's positive capability set is fast ordinary ELF linking + incremental warm relink. For anything in the lists above, reld either delegates to lld (correct but lld-speed) or drops/ignores the flag (silent), or errors. Any item here that a real-world link actually needs is therefore either a correctness hand-off to lld or a silently-missing feature — worth triaging into "route to lld" vs "silently ignore" vs "implement natively".

Activity

  1. zackees commented on Sep 17, 2026

    @zackees
    CollaboratorAuthor

    Wave 0 audit (#153): keeping this open. The plan was to fold this inventory into #123's flag table and close it, but the table is not yet a superset, so closing now would lose the gap list.

    State: crates/reld-core/src/flag_table.rs holds 26 Disposition rules and says so in its own module doc — it is "the initial table covering the flags reld already classifies". #123 Phase 1 still has to vendor lld's Options.td and GNU ld's option list to grow it to the full union, and the flag_table_covers_lld_inventory check that would make this inventory redundant does not exist yet.

    So this issue stays the authority for what the native engine cannot do until that coverage check is green. When it lands, close this and let the table plus its CI check be the single source of truth.

    Overlap to be aware of: #123's body already restates much of this inventory (sections B and C) with per-flag evidence. Prefer #123 when the two disagree; it was audited against ld.lld 21.1.8 and real driver output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions