static binaries missing build-id info
Task Info (Flyspray) | |
---|---|
Opened By | Seth Pellegrino (sethp0808) |
Task ID | 79794 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2023-09-27 12:36:11 UTC |
Status | Assigned |
Assignee | Santiago Torres (sangy) |
Assignee | Morten Linderud (Foxboron) |
Assignee | Robin Candau (Antiz) |
Details
Description:
When I run file /usr/bin/{containerd,containerd-shim}
, I see:
/usr/bin/containerd: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a4155102a309801bf5a0461585b7d5b32ef5cd8e, for GNU/Linux 4.4.0, stripped
/usr/bin/containerd-shim: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
Additional info:
This is with containerd package v1.7.6-1
I've dug into the build a little bit, and it looks like setting an explicit -B
flag for the linker (which also implies the PKGBUILD script invents its own build id) leaves the binaries in an "unstripped" state for some reason. The other thing I tried was passing -linkmode=external
, and that produced a binary with a build-id that crashes when invoked (with a SIGTRAP).
Steps to reproduce:
I noticed this when I attempted to run debuginfod-find debuginfo /usr/bin/containerd-shim-runc-v2
and it reported:
Cannot extract build-id from /usr/bin/containerd-shim-runc-v2: no error
Server query failed: Invalid argument
I'm not quite sure where to go next; for now, I've manually built & installed the containerd-debug
package and that's gotten me access to the symbols I was looking for, but it'd be nice if the regular debuginfod
infrastructure could be made to work for these binaries too.