Skip to content

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

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.rsNATIVE_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 throughputld_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

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions