Skip to content

Support for /usr/lib/debug/.build-id #1401

@bobrik

Description

@bobrik

It's basically debuginfod protocol, but on local filesystem. See fedora and debian, which both use it.

Here's blazecli on Debian Trixie:

$ blazecli symbolize elf --path /lib/aarch64-linux-gnu/libc.so.6 0xe34c0
2025-12-30T00:08:20.785128Z  WARN debug link references destination `2c35038e644c70c27979cb0b90182f43f6794b.debug` which was not found in any known location
0x000000000e34c0: __openat_2 @ 0xe34c0+0x0

Compare this to llvm-addr2line:

$ llvm-addr2line -ife /lib/aarch64-linux-gnu/libc.so.6 0xe34c0
__openat_2
./io/openat_2.c:24
$ strace -e openat llvm-addr2line -ife /lib/aarch64-linux-gnu/libc.so.6 0xe34c0 2>&1 | grep build-id
openat(AT_FDCWD, "/usr/lib/debug/.build-id/b3/2c35038e644c70c27979cb0b90182f43f6794b.debug", O_RDONLY|O_CLOEXEC) = 3

Here's the commit that enabled llvm to do this: llvm/llvm-project@00e436f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions