Skip to content
Commit eb070310 authored by Jérémy Bobbio's avatar Jérémy Bobbio
Browse files

Install detached symbols from debug .deb before comparing ELF files

Before comparing an ELF file without debug symbols, we test if
it's coming from Debian package, and have both a Build Id and a .gnu_debuglink
section. In that case, we now look for packages in the same container (e.g.
directory) for one containing matching debug symbols.

If one is found, we put the relevant debug symbols in a `.debug` sub-directory
near where the ELF file has been extracted. This will then be picked
automatically when running `objdump --disassemble --line-numbers`.

Sadly, objdump currently does not know how to process compressed debug symbols
(#812089). So we first have to uncompress the debug symbols, and fix the CRC in
the original `.gnu_debuglink` section to match the new file. Far from ideal,
but as we record the original difference before doing the change, this should
not be much of a problem.
parent 1a95b2f4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment