Skip to content

Track and remove inherited reld-diff ignore patterns #13

Open
1 of 1 issue completed
Open

Description

@zackees

Follow-up from #5.

The Phase 1 semantic oracle inherits known ELF and Mach-O structural/relocation divergences from Wild and from fixture-specific reference-linker comparisons. Every default, fixture, and configured ignore must cite this issue (or another open tracking issue) on the ignore entry itself. The acceptance ratchet must remove entries as the corresponding linker behavior converges; architecture-specific entries must be explicitly scoped and are only applied/ratcheted on those architectures.

Acceptance: no semantic-oracle ignore remains without an open, specific explanation and tracking issue; full-diff CI configuration cannot inject suite-global ignores that evade fixture ratcheting; remove each pattern when it is no longer observed by its covering fixture.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. zackees commented on Sep 17, 2026

    @zackees
    CollaboratorAuthor

    First report from the new default-ignore ratchet

    PR #160 is merged, and the Linux acceptance job now prints which inherited --reld-defaults patterns no fixture needed. From the run on that PR (Phase 1 / linux-gnu x86_64):

    30 of 63 inherited reld-diff default ignores were not observed by any fixture in this run (reld#13)

    .dynamic.DT_BIND_NOW
    dynsym.__tls_get_addr.*
    rel.dynamic-plt-bypass
    rel.extra-opt.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21.MovzXnLsl16.*
    rel.extra-opt.R_X86_64_REX_GOTPCRELX.MovIndirectToLea.static-*
    rel.match_failed.R_AARCH64_TLSDESC_LD64_LO12
    rel.match_failed.R_AARCH64_TLSGD_ADD_LO12_NC
    rel.missing-got-plt-got
    rel.missing-opt.R_AARCH64_ADR_GOT_PAGE.AdrpToAdr.*
    rel.missing-opt.R_AARCH64_ADR_GOT_PAGE.ReplaceWithNop.*
    rel.missing-opt.R_AARCH64_ADR_PREL_PG_HI21.AdrpToAdr.*
    rel.missing-opt.R_AARCH64_ADR_PREL_PG_HI21.ReplaceWithNop.*
    rel.missing-opt.R_X86_64_TLSDESC_CALL.SkipTlsDescCall.*
    rel.plt.absent-thunk
    rel.plt.extra-thunk
    rel.undefined-weak.dynamic.R_AARCH64_ABS64
    rel.undefined-weak.dynamic.R_X86_64_64
    section.annobin.notes.entsize
    section.bss.alignment
    section.eh_frame.flags
    section.gnu.build.attributes
    section.gnu.warning
    section.phdr
    section.plt
    section.sframe
    section.shdr
    segment.GNU_PROPERTY.alignment
    segment.GNU_PROPERTY.flags
    segment.GNU_SFRAME.alignment
    segment.GNU_SFRAME.flags
    

    How to read it

    "Unobserved" is a lead, not a verdict, and the list has three distinct kinds of entry in it:

    1. Wrong architecture. Every R_AARCH64_* pattern is unobservable on an x86_64 runner by construction. These are not candidates until the same report runs on the aarch64 leg; the honest signal is the intersection across architectures, not one run.
    2. Feature off by default. section.sframe and segment.GNU_SFRAME.* cannot be observed while SFrame is experimental and disabled.
    3. Genuine candidates. The ones that remain — section.phdr, section.shdr, section.plt, section.bss.alignment, section.eh_frame.flags, section.gnu.warning, rel.missing-got-plt-got, rel.plt.extra-thunk / absent-thunk — describe divergences from GNU ld that this suite no longer sees. Each is either a divergence reld has closed, or a hole in fixture coverage, and telling those two apart is the work this issue asks for. Removing one and watching the suite is the cheapest way to find out.

    Note section.data.rel.ro is not in the list: it is still observed, so despite its stale comment ("We don't yet support these sections", which stopped being true in #155) it is still suppressing a real difference and must not be removed blind. That is exactly why this had to be measured rather than reasoned about.

    Next

    Run the same report on the aarch64 leg and take the intersection, then remove candidates one at a time. RELD_RATCHET_DEFAULT_IGNORES=1 turns the report into a failure for a run that covers the matrix, so once the list is empty it can stay empty.

  2. zackees commented on Sep 18, 2026

    @zackees
    CollaboratorAuthor

    PR #187 (#186) removed 15 inherited default ignores from apply_reld_defaults: section.shdr, section.phdr, section.plt, section.bss.alignment, section.gnu.build.attributes, section.annobin.notes.entsize, section.eh_frame.flags, section.gnu.warning, rel.missing-got-plt-got, rel.plt.extra-thunk, rel.plt.absent-thunk, rel.undefined-weak.dynamic.R_X86_64_64, dynsym.__tls_get_addr.*, rel.missing-opt.R_X86_64_TLSDESC_CALL.SkipTlsDescCall.*, rel.extra-opt.R_X86_64_REX_GOTPCRELX.MovIndirectToLea.static-*.

    The report went from 28 of 63 unobserved to 13 of 48 on the linux-gnu x86_64 leg, with the acceptance suite green. segment.GNU_PROPERTY.alignment and .flags were kept, because a fixture still observes them.

    Caveat: "unobserved" was measured on x86_64 only, since the aarch64 fixtures are "Architecture disabled" in CI. The architecture-neutral removals (section.shdr, section.phdr, section.plt, …) may still be needed on aarch64. If the aarch64 leg is enabled, rerun this report there and restore any entry it needs, scoped to that architecture.

    Remaining unobserved: the R_AARCH64_* patterns and the SFrame entries, which can't be observed on this leg by construction.

  3. zackees commented on Sep 18, 2026

    @zackees
    CollaboratorAuthor

    First aarch64 report (from #194 / PR #196)

    The aarch64 leg now runs the acceptance oracle, which lets us cross-check the default-ignore report across architectures. Same run (35398041328):

    • x86_64: 13 of 48 unobserved
    • aarch64: 22 of 56 unobserved

    The intersection is what counts. Every R_AARCH64_* default that looked stale from x86_64 (TLSDESC_LD64_LO12, TLSGD_ADD_LO12_NC, AdrpToAdr, ReplaceWithNop, TLSIE_ADR_GOTTPREL_PAGE21) is observed on aarch64, so all of them stay. Defaults unobserved on both architectures:

    .dynamic.DT_BIND_NOW
    rel.dynamic-plt-bypass
    rel.undefined-weak.dynamic.R_AARCH64_ABS64   <- aarch64-named, yet unobserved on aarch64 too
    section.sframe
    segment.GNU_SFRAME.alignment
    segment.GNU_SFRAME.flags
    

    The three SFrame entries can't be observed while SFrame is off by default. That leaves three genuine removal candidates: .dynamic.DT_BIND_NOW, rel.dynamic-plt-bypass, rel.undefined-weak.dynamic.R_AARCH64_ABS64.

    #186's x86_64-only caveat has been checked. section.bss.alignment and section.plt were removed as unobserved on x86_64 in #187, then observed again on aarch64, exactly as predicted. PR #196 restores them scoped to aarch64. It also adds an aarch64-scoped section.got default: GNU ld on aarch64 always emits a .got, reld doesn't when nothing needs one, and 20 fixtures showed the difference. The relocation-level rel.* keys still compare the GOT entries themselves.

    One real bug found on the way: #200. Absolute PROVIDE symbols in a shared object get R_*_RELATIVE GOT relocations, so they're rebased at load. It's reproduced on both architectures, and the linker-script-provide fixture's aarch64 ignore cites #200, not this issue.

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