← Back to issue list

Ensure elf patching works correctly with golang created ELF files

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1805205
Type
issue
State
closed
Author
~sergiusens
Labels
19.04 19.04-patchelf
Created
Updated
Closed

Current evaluation

Fixed Go ELF patching in snapcore/snapcraft PR #2519 by updating the PatchELF handling used for Go-created binaries.

Resolution: closed resolved

Reason: The maintainer-linked proposed fix in snapcore/snapcraft PR #2519 was merged and resolved the issue. It addressed PatchELF handling for Go-generated ELF binaries, including interpreter and PT_DYNAMIC cases.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Not all ELF files are handled correctly with golang, https://github.com/NixOS/patchelf/issues/152 and https://github.com/NixOS/patchelf/issues/146

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed Go ELF patching in snapcore/snapcraft PR #2519 by updating the PatchELF handling used for Go-created binaries.
stealth/space-bunny-alpha — closed superseded PR #2519 merged as e39d2404c, adding Patchelf 0.10 and dynamic Go binary relinking; PR #2531 later replaced it with locally patched Patchelf 0.9 in 44be372e3.
stealth/space-bunny-alpha — closed resolved Go ELF patching was addressed by merged PR snapcore/snapcraft#2519 (e39d2404c), adding patchelf 0.10 support and relinking dynamic Go binaries. PR #2531 later restored patched 0.9 for reliability.
stealth/space-bunny-alpha — closed resolved Go ELF patching was addressed by merged canonical/snapcraft#1798 (fa8b7b174), stripping .note.go.buildid to make room for patching.
qwen/qwen3.6-35b-a3b — — Closed without resolution. References upstream patchelf issues #146 and #152. Likely superseded by upstream fixes or abandoned due to zero comments and prolonged inactivity.
qwen/qwen3.6-35b-a3b — — Closed without comments or resolution. The ELF patching compatibility issue for Go-generated files was abandoned, with no fix applied or referenced.
qwen/qwen3.6-35b-a3b — — Closed without resolution. No fix or pull request was submitted, indicating the issue was abandoned due to prolonged inactivity and zero comments.
qwen3.6-35b-a3b-mtp-q6 — — Closed without a direct fix. References upstream patchelf issues for Go ELF handling. Superseded or abandoned as version 19.04 support ended.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#2519 (confidence 98%)

    Proposed fix was linked by the maintainer immediately before the issue was closed.

  • Related To: patchelf#146 (confidence 90%)

    The issue identifies PatchELF PT_DYNAMIC handling as one cause of failures with Go ELF files.

  • Related To: patchelf#152 (confidence 90%)

    The issue identifies this upstream ELF-patching defect as another relevant failure case.

Related issues

Issue Project State Summary Similarity
#1805206 Ensure elf patching works correctly with java created ELF files snapcraft (launchpad) closed Java-created ELF patching was addressed by snapcore/snapcraft#2533, linked by the maintainer as the resolution to the segfault issue.
80%
#3589 snap: correct patch apply for patchelf snapcraft merged Merged PR #3589 fixed PatchELF patch application in the snap build via commit d9484faf9 (merge a636d26b5).
78%
#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.
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.
75%
#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.
74%
#2081 elf: patch everything instead of a subset of elf files snapcraft merged Merged PR #2081 restored Snapcraft 2.39 behavior by patching every ELF file; commit 77770452b partially reverted 64f78f762a05.
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.
73%
#1666 Refactor to support elf patching snapcraft closed ELF patching support was refactored by merged PR #1744 in commit ec7ba948a, converting the ELF implementation into reusable libraries.
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%
#1753995 patchelf warning / binary segfaults snapcraft (launchpad) open PatchELF corrupted Go-built Telegraf classic snaps into runtime segfaults; no-patchelf avoided the crash, but a 2019 Snapcraft 3.8 reproduction remains unverified on current code.
71%