<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 24 April 2017 at 23:16, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></blockquote><div><br></div><div><br></div><div>That's sort of that yaml2obj is, except that you use yaml instead of c++ to describe the file you want to construct. That makes it a lot easier to write the test, as you can just use obj2yaml to get the yaml (and prune it if necessary), so this is the direction I'd like to move to. It does mean that there will be an input file, but I don't think that's such a bad thing. (well, I suppose I could pipe the yaml into yaml2obj, but that is not going to help anything).</div><div><br></div><div>I'll still need to create a temporary elf file, as the api's I am using accept a file name.</div></div></div></div>