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

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 11:25:26 PDT 2016


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.


Repository:
  rL LLVM

https://reviews.llvm.org/D23349





More information about the llvm-commits mailing list