build-ids, .debug_sup and other IDs
Jakub Jelinek
jakub@redhat.com
Thu Feb 25 16:48:40 GMT 2021
On Thu, Feb 25, 2021 at 11:42:45AM -0500, Frank Ch. Eigler via Dwz wrote:
> > FWIW I looked a little at unifying these. For example,
> > bfdopncls.c:bfd_get_alt_debug_link_info could look at both the build-id
> > and .debug_sup.
> >
> > But, this seemed a bit weird. What if both appear and they are
> > different? Then a single API isn't so great -- you want to check the ID
> > corresponding to whatever was in the original file.
>
> If both appear and are different, can we characterize the elf file as
> malformed?
Unsure, the DWARF spec only talks about .debug_sup, the NOTE is a GNU
extension.
> Does our current tooling produce such files? If it's an
dwz without --dwarf-5 produces .gnu_debugaltlink in the referrers and
.note.gnu.build-id in the supplemental object file.
For dwz --dwarf-5, if it produced a .note.gnu.build-id, it would produce
the same one, but I thought that if I produced that, then consumers could
keep using that instead of .debug_sup which is the only thing defined
in the standard, so in the end dwz --dwarf-5 only produces .debug_sup
on both the referrers side and on the side of supplemental object file
as DWARF specifies.
Jakub
More information about the Dwz
mailing list