<div dir="ltr">I suppose that's a reasonable concern.  I also didn't notice that this was a unittest, I assumed it was a lit test.<div><br></div><div>If that's the case, is there any way to use llvm/Object to construct a minimal ELF file in memory with a hardcoded symbol in the BSS section.  It can even be missing certain critical things that would be normally required by an ELF file, and contain nothing but a single BSS section.  Write it to some memory buffer, and then use ObjectFileELF to try to do a lookup on it.</div><div><br></div><div>This way there's no input files of *any* kind.  Is this possible?</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 24, 2017 at 3:09 PM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br>
<br>
> We don't support running the test suite on Windows with MSVC.  We run it<br>
>  with clang targeting windows instead.  So anyone running the test suite on<br>
>  Windows is already using clang, and we can just specify a linux triple to<br>
>  get an ELF binary.<br>
<br>
You'll need a linker as well, which we do have in the form of lld, but I don't really want to pull in lld for the sake of this test. And I also used objcopy, although for this particular test we could probably do without it.<br>
<br>
However, my main question is: can you still call this a unit test if it calls out to a compiler to produce an object file?<br>
<br>
<br>
<a href="https://reviews.llvm.org/D32434" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32434</a><br>
<br>
<br>
<br>
</blockquote></div>