Skip to content

Inspect GNU thin archives during ELF ABI validation #651

Closed

Description

@LunaStev

Current evidence

src/link_validation/elf.rs recognizes direct ELF files and ordinary Unix archives beginning with !<arch>\n. Other inputs are intentionally ignored as formats that do not carry inspectable ELF metadata.

GNU thin archives use the separate !<thin>\n format and reference member files instead of embedding each member payload. They currently fall through as an unrecognized input, so RISC-V and LoongArch pre-link ABI validation can skip incompatible ELF members stored through a thin archive.

Scope

  • Recognize GNU thin archives explicitly.
  • Resolve referenced members relative to the archive location according to the thin-archive format.
  • Inspect ELF member machine and e_flags through the existing validation path.
  • Preserve handling of ordinary GNU/BSD archives, direct ELF objects, linker scripts, and LLVM bitcode.
  • Reject malformed thin-archive metadata with a bounded diagnostic instead of following invalid offsets or paths blindly.

Completion criteria

  • Fixture tests cover a valid thin archive, a mixed/mismatched RISC-V or LoongArch member, long member names, and malformed/truncated metadata.
  • ABI mismatches inside thin archives are rejected before the linker is invoked.
  • Existing ordinary archive validation continues to pass.

Activity

  1. added
    bug
    build
    help wanted
    needs testing
    on Sep 15, 2026
  2. self-assigned this
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbuildhelp wantedneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions