]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod: Support queries for ELF/DWARF sections
authorAaron Merey <amerey@redhat.com>
Tue, 1 Nov 2022 03:44:23 +0000 (23:44 -0400)
committerAaron Merey <amerey@redhat.com>
Tue, 1 Nov 2022 04:25:15 +0000 (00:25 -0400)
commitfb833750c395ce268d16fd44e4decafbb41208a8
treef756e96a54ea06ad831e11d14d2675d49c5e242e
parent5d8cd51a460fc29f35a016836c39fcea6bf59fb0
debuginfod: Support queries for ELF/DWARF sections

Add new function debuginfod_find_section which queries debuginfod
servers for the raw binary contents of the specified ELF/DWARF section
in a file matching the given build-id.

Extend the server webapi to support section queries. Section query
URLS have the following format: /buildid/BUILDID/section/SECTION

The server will attempt to extract the section from a debuginfo file
matching the given build-id.  If the debuginfo file cannot be found
or the section has type SHT_NOBITS, the server will attempt to extract
the section from the executable file matching the build-id.

If the server is built without section query support, the client will
attempt to download the debuginfo matching the build-id and extract the
section.  If the debuginfo file cannot be found or the section has type
SHT_NOBITS, the server will attempt to download the executable file
matching the build-id and extract the section.

Signed-off-by: Aaron Merey <amerey@redhat.com>
17 files changed:
ChangeLog
NEWS
debuginfod/ChangeLog
debuginfod/Makefile.am
debuginfod/debuginfod-client.c
debuginfod/debuginfod-find.c
debuginfod/debuginfod.cxx
debuginfod/debuginfod.h.in
debuginfod/libdebuginfod.map
doc/ChangeLog
doc/Makefile.am
doc/debuginfod.8
doc/debuginfod_find_debuginfo.3
doc/debuginfod_find_section.3 [new file with mode: 0644]
tests/ChangeLog
tests/Makefile.am
tests/run-debuginfod-section.sh [new file with mode: 0755]