[PATCH] D18055: ELF: Implement --build-id.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 12:03:02 PST 2016


On Fri, Mar 11, 2016 at 12:01 PM, Ed Maste <emaste at freebsd.org> wrote:

> On 11 March 2016 at 14:52, Rui Ueyama <ruiu at google.com> wrote:
> > It doesn't seem to make sense to leave 8 byte blank in the .note section.
> > I'd think that setting the size to 8 byte conveys the message that there
> is
> > a chance of collision, too. So I guess that keeping it 8 bytes is a good
> > idea.
>
> It turns out that lldb only accepts 16 and 20 byte build-ids today:
>
>                 case LLDB_NT_GNU_BUILD_ID_TAG:
>                     // Only bother processing this if we don't already
> have the uuid set.
>                     if (!uuid.IsValid())
>                     {
>                         // 16 bytes is UUID|MD5, 20 bytes is SHA1
>                         if ((note.n_descsz == 16 || note.n_descsz == 20))
>                         { ...
>
> however, it uses a zero-padded crc32 in the absence of build-id so
> it's already willing to deal with shorter identifiers:
>
> [  0] 7D9D49C0-0000-0000-0000-000000000000                    /bin/ls
>       /usr/lib/debug/bin/ls.debug
>
> Refusing an 8-byte build-id and using a 4-byte crc instead doesn't
> seem sensible, so I'll post an lldb patch to accept anything >= 4
> bytes.
>

Sure. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160311/ed03f770/attachment.html>


More information about the llvm-commits mailing list