wavefnd / wavefnd/Wave

Inspect GNU thin archives during ELF ABI validation

Open
#651 0 comments 0 reactions 0 assignees View on GitHub
bug build help wanted needs testing
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

## Current evidence

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

GNU thin archives use the separate `!\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.

Contributor guide

Open the contributing guide

Research direction

Start in src/link_validation/elf.rs and trace how direct ELF files and ordinary archives reach the existing ABI validation path. Read the thin-archive format details before adding coverage for valid, mixed or mismatched, long-name, malformed, and truncated fixtures. Done means thin-archive members are validated safely while ordinary archives, direct ELF objects, linker scripts, and LLVM bitcode retain their current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.