[PATCH] D23349: [ELF] Support for --build-id=uuid

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 11:36:03 PDT 2016


On Wed, Aug 10, 2016 at 11:25 AM, Eugene Leviant <evgeny.leviant at gmail.com>
wrote:

> evgeny777 added inline comments.
>
> ================
> Comment at: ELF/OutputSections.cpp:1687
> @@ -1678,1 +1686,3 @@
>  template <class ELFT>
> +void BuildIdUuid<ELFT>::writeBuildId(ArrayRef<ArrayRef<uint8_t>> Bufs) {
> +#ifdef LLVM_ON_WIN32
> ----------------
> ruiu wrote:
> > evgeny777 wrote:
> > > ruiu wrote:
> > > > I'd add code to generate a RNG to LLVM rather than to LLD because it
> seems generic and should be useful in other places.
> > > You mean creating random GUID, don't you?
> > GUID is actually jus random 16 bytes, so maybe adding a function to
> create a GUID is too narrowly scoped. How about defining a function that
> returns truely random bytes of any length? Like
> >
> >   std::vector<uint8_t> getRandomBytes(size_t Length);
> There is a special routine on Windows which should be used to create GUID
> (UuidCreate). I'm afraid getRandomBytes is too generic for this particular
> case.
>

What UuidCreate does is to populate a return value with random bytes, no?
That function might make difference when UUID was defined to include a MAC
address and a timestamp, but it is no longer the case, so I'm thinking that
using that function to generate UUIDs is just a historical reason.


>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D23349
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/3cd7e51d/attachment.html>


More information about the llvm-commits mailing list