← Back to issue list

elf: add handling and patching helpers

View original Github issue

Metadata

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

Current evaluation

Merged in snapcore/snapcraft#3840 via commit 8a9914510, adding helpers to enumerate ELF binaries and locate architecture-specific dynamic linkers.

Resolution: closed resolved

Reason: PR #3840 was approved and merged into main as commit 8a9914510. It implemented ELF binary discovery and dynamic-linker location helpers, with unit tests.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Implement functions to list ELF binaries in a given directory and to locate the ELF dynamic linker. Co-authored-by: Kyle Fazzari <kyrofa@ubuntu.com> 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-1190

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcore/snapcraft#3840 via commit 8a9914510, adding helpers to enumerate ELF binaries and locate architecture-specific dynamic linkers.
stealth/space-bunny-alpha — closed resolved Merged PR #3840 as commit 8a9914510, adding helpers to list ELF binaries in a directory and locate the ELF dynamic linker.
stealth/space-bunny-alpha — closed resolved Merged ELF handling and patching helpers via #3840 (commit 8a9914510), adding ELF-binary discovery and dynamic-linker location.
stealth/space-bunny-alpha — closed resolved Merged into main via #3840 (commit 8a9914510), adding helpers to list ELF binaries and locate the ELF dynamic linker.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Introduces ELF binary listing and dynamic linker location helpers. Co-authored by Kyle Fazzari, Chris Patterson, and Sergio Schvezov. The merge increased overall coverage by 0.09% with 92.68% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3514 elf: add fallback methods to detect library dependencies snapcraft merged Merged in snapcore/snapcraft#3514 (commit 76ca948c4): ELF dependency detection now falls back from ldd to host-libc6 preloading and loader tracing before warning.
77%
#1935 elf: contemplate more patching scenarios snapcraft merged Merged PR #1935 as 048adc4a3, adding ELF patching for classic snaps built on bionic targeting core16 and for hooks built with Snapcraft.
76%
#3841 elf: add elf file patcher snapcraft merged Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191.
75%
#3839 elf: add elf file handler class snapcraft merged PR #3839 was merged into main as commit 6830dc69c, porting the Snapcraft 6.x ElfFile handler into snapcraft/elf/_elf_file.py with helpers, ELF errors, and unit tests (CRAFT-1192).
74%
#1850 pluginhandler: patch and handle elf files on glibc mismatch snapcraft merged Merged in snapcraft#1850 (bdaf0b7f1), adding host libc6 staging and its dynamic loader when ELF files need newer glibc; fixes #1668 and #1669.
74%
#3111 elf: fix parsing of notes after patchelf mangling snapcraft merged Merged in snapcraft#3111 by parsing ELF notes from sections instead of the note segment, handling binaries mangled by patchelf.
74%
#1669 patchelf with ld-linux from the future snapcraft closed Resolved by commit bdaf0b7f1, which added Snapcraft handling for PatchELF and ELF files when the built glibc/linker does not match the base.
73%
#75 refactor: rewrite elf file support debcraft merged Merged as c841273, replacing Snapcraft-derived ELF handling with deb-oriented library dependency support. Symbol support was deferred to follow-up work.
72%
#2929 elf: fixes for corrupt shared objects snapcraft merged Merged PR snapcore/snapcraft#2929 (commit 051f24e07, Feb 2020) catching elftools ConstructErrors as CorruptedElfFileError and skipping corrupt shared objects during library crawling.
72%
#3277 pluginhandler: support using patchelf on strict snaps snapcraft merged Merged PR #3277 as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters in strictly confined snaps.
72%