[PATCH] D18055: ELF: Implement --build-id.
Ed Maste via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 12:01:30 PST 2016
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.
More information about the llvm-commits
mailing list