[lld] [LLD][COFF] Add -build-id flag to generate .buildid section. (PR #71433)
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 14:19:51 PST 2023
ZequanWu wrote:
> Related to __lld_buildid discussion, I'd prefer using a pair of symbols: __lld_buildid_start and __lld_buildid_end, so users of these symbols don't need to make assumptions about the size. This would also let us change the size in the future (if needed) without breaking all users.
For COFF, I think it's okay to assume that build id size is a constant [16 bytes](https://github.com/llvm/llvm-project/blob/7fc792cba7663b2aa54f259515319d74a5625be0/llvm/include/llvm/Object/CVDebugRecord.h#L32) (or 20 bytes if we include the 4 byte age field). Many existing tools that makes uses of build id (or guid in the PDB term) already assume it's 16 bytes and use that to match binary and pdb.
https://github.com/llvm/llvm-project/pull/71433
More information about the llvm-commits
mailing list