[Dwarf-Discuss] Support for SourceLink in DWARF

Eugene Rozenfeld Eugene.Rozenfeld at microsoft.com
Wed May 4 18:54:08 PDT 2022


Hello,

I work on the Linux tools team at Microsoft and I'd like to comment on the issue  https://dwarfstd.org/ShowIssue.php?issue=181223.1 that proposes to add info similar to SourceLink to the DWARF format.
We are interested in pushing this forward both as a developer experience improvement and as a step in improving secure supply chain guarantees. It's important to be able to figure out where the sources come from if we want to check the binary integrity.

The issue discusses two approaches: one involves augmenting the DWARF format and the other one relies on buildid's and debuginfod servers. We believe the approach whereby an arbitrary URL for source retrieval (e.g., github, VSTS, etc.) can be specified offers greater applicability and flexibility over relying on buildid and debuginfod servers. For instance, it can accommodate scenarios where storing debuginfo along with sources on a debuginfod server may not always be feasible.

The issue discusses two approaches to modifying the  DWARF format: one is augmenting the existing file table to allow the specification of a URL (the proposed resolution) and the other one is a per CU URL table that would allow the equivalent of SourceLink wildcards. The tradeoff is simplicity vs. potential DWARF file size saving if many source files are involved in the compilation. We are ok with either resolution. The important thing is a standard way to encode the source file information so that the producers and consumers agree.

Thank you,

Eugene



More information about the Dwarf-Discuss mailing list