← Back to issue list

elf: add elf file handler class

View original Github issue

Metadata

Project
snapcraft
Number
#3839
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged into main. Introduces an ELF file handler class with extraction helpers, ported from Snapcraft 6.x. Approved by a reviewer, rebased on main, and merged with a 0.46% test coverage increase.

Suggested action:

No scores available.

Issue body

Add a class that represents and provides helpers to extract basic information from ELF files. This is a port of the corresponding class from Snapcraft 6.x. Co-authored-by: Kyle Fazzari <kyrofa@ubuntu.com> Co-authored-by: James Henstridge <james@jamesh.id.au> Co-authored-by: Chris Patterson <chris.patterson@canonical.com> Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com> Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `pytest tests/unit`? ----- CRAFT-1192

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into main. Introduces an ELF file handler class with extraction helpers, ported from Snapcraft 6.x. Approved by a reviewer, rebased on main, and merged with a 0.46% test coverage increase.
qwen3.6-35b-a3b-mtp-q6 Merged an ELF file handler class to extract basic ELF information, ported from Snapcraft 6.x. The author addressed feedback, rebased on main, and passed all checks. The merge increased code coverage by 0.46%.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Introduces an ELF file handler class to extract basic metadata, ported from Snapcraft 6.x. The author rebased the branch, resolved review feedback, passed lint and tests, and increased coverage by 0.46% prior to merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3841 elf: add elf file patcher snapcraft merged Merged an ELF file patcher using patchelf, ported from Snapcraft 6.x. Approved by one reviewer, passed CI checks, and increased test coverage by 0.26%. Resolves CRAFT-1191.
80%
#3840 elf: add handling and patching helpers snapcraft merged Merged into main following reviewer approval and passing CI checks. Introduces ELF binary listing and dynamic linker location helpers, adding handling and patching utilities to the elf module while increasing test coverage.
79%
#75 refactor: rewrite elf file support debcraft merged Merged rewrite of ELF file support to better match deb building needs, replacing Snapcraft's implementation. Handles needed libraries; symbol support deferred. Approved by two reviewers, passed all CI checks, and resolves #72.
75%
#2663 elf: handle invalid elf files snapcraft merged Merged changes to handle invalid ELF files by catching elftools exceptions and silently ignoring them. Includes a regression test, passed CI, and achieved 100% diff coverage. Resolves LP #1838098.
73%
#3408 elf: extract defined symbol versions snapcraft merged Merged into master. Adds defined symbol version extraction to the ElfFile class, enabling Snapcraft to detect missing or duplicate libraries. Approved by two reviewers, passed CI, and modified three files.
72%
#1989 elf: don't parse elf more than necessary snapcraft merged Merged a single-line change optimizing ELF parsing to avoid unnecessary work, yielding a minor performance improvement. Approved by a maintainer and passed CI checks.
71%