Repository navigation
Description
Goal
reld should be safe as soldr's default linker: it must never silently drop a flag's semantics. Any flag the fast native engine cannot honor must escalate to the bundled lld engine (the capable linker), the same way LTO/ICF already do — never fall through to the native engine's silent-ignore path.
Evaluation (as of this writing)
bridge.rs::collect_requested_capabilities already routes the following flags to lld by mapping them to a Capability:
| Flag(s) | Capability | Status |
|---|---|---|
-flto, --plugin, /LTCG |
Lto |
✅ routed |
--icf=all / --icf=safe |
Icf |
✅ routed |
--discard-all, -x |
DiscardAll |
✅ routed |
--fatal-warnings |
FatalWarnings |
✅ routed |
--color-diagnostics / --no-color-diagnostics |
ColorDiagnostics |
✅ routed |
--no-undefined-version / --undefined-version |
VersionScriptPolicy |
✅ routed |
--fix-cortex-a53-843419 |
CortexA53Erratum |
✅ routed |
These same flags (--fatal-warnings, --color-diagnostics, --no-undefined-version, --undefined-version) are also listed in SILENTLY_IGNORED_FLAGS (args/elf.rs), which is misleading dead weight — they are routed, not ignored.
The actual gap: flags silently dropped with no routing
These are in SILENTLY_IGNORED_FLAGS (or SILENTLY_IGNORED_SHORT_FLAGS) but have no Capability and no entry in collect_requested_capabilities, so their semantics are lost with no warning and no lld hand-off:
| Flag(s) | What is lost | Migration |
|---|---|---|
--start-group / --end-group / -( / -) |
archive-cycle re-scan semantics | add a Capability (route to lld) or prove native demand-driven resolution is byte-equivalent (add a circular-liba.a ↔ libb.a test) |
--nostdlib |
suppression of built-in search paths | add a Capability (route to lld) or verify native adds no built-in paths (then keep a loud no-op + test) |
--sort-common |
common-symbol ordering | add a Capability (route to lld) |
--stats |
linker statistics output | add a Capability (route to lld) or implement natively |
Requirement
- Every flag above must resolve to one of: native (honored, with a test), route to
lld(aCapability+ acollect_requested_capabilitiesarm), or loud error. No silent drops remain. - Remove the misleading
SILENTLY_IGNORED_FLAGSentries for--fatal-warnings,--color-diagnostics,--no-undefined-version,--undefined-version(already routed). RELD_LOG_ENGINE=1must show the escalation for each migrated flag; an explicit--engine=reldon a flag that requireslldmust fail loudly.
Acceptance
- A link using any currently-dropped flag either links correctly through
lldor fails with a capability-specific diagnostic — never a silent drop. --start-group/--end-groupcircular-archive case is covered by a test (equivalence) or routed tolld.RELD_LOG_ENGINE=1shows the escalation for each migrated flag.
Context
- Soldr reld-as-default was reverted as premature (soldr#3263); this is its prerequisite.
- Related: Inventory: native engine gaps (routed to lld / ignored / unsupported) #120 (native gap inventory).
Activity
revert(bridge): undo flawed escalate-ignored-flags change (#124)