<div dir="ltr">On Fri, Jan 19, 2018 at 9:44 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Fri, Jan 19, 2018 at 12:29 PM Leonardo Santagada <<a href="mailto:santagada@gmail.com" target="_blank">santagada@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>No I didn't, I used cl.exe from the visual studio toolchain. What I'm proposing is a tool for processing .obj files in COFF format, reading them and generating the GHASH part.</div><div><br></div><div>To make our build faster we use hundreds of unity build files (.cpp's with a lot of other .cpp's in them aka munch files) but still have a lot of single .cpp's as well (in total something like 3.4k .obj files).</div><div><br></div><div>ps: sorry for sending to the wrong list, I was reading about llvm mailing lists and jumped when I saw what I thought was a lld exclusive list.<br></div></div></blockquote><div><br></div></span><div>A tool like this would be useful, yes.  We've talked about it internally as well and agreed it would be useful, we just haven't prioritized it.  If you're interested in submitting a patch along those lines though, I think it would be a good addition.</div><div><br></div><div>I'm not sure what the best place for it would be.  llvm-readobj and llvm-objdump seem like obvious choices, but they are intended to be read-only, so perhaps they wouldn't be a good fit.</div><div><br></div><div>llvm-pdbutil is kind of a hodgepodge of everything else related to PDBs and symbols, so I wouldn't be opposed to making a new subcommand there called "ghash" or something that could process an object file and output a new object file with a .debug$H section.</div><div><br></div><div>A third option would be to make a new tool for it.</div><div><br></div><div>I don't htink it would be that hard to write.  If you're interested in trying to make a patch for this, I can offer some guidance on where to look in the code.  Otherwise it's something that we'll probably get to, I'm just not sure when.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">
</div></blockquote></div></div>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">I would love to write it and contribute it back, please do tell, I did find some of the code of ghash in lld, but in fuzzy on the llvm codeview part of it and never seen llvm-readobj/objdump or llvm-pdbutil, but I'm not afraid to look :)<br></div><div class="gmail_extra"><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Leonardo Santagada</div>
</div></div>