[Lldb-commits] [PATCH] D32434: ObjectFileELF: Fix symbol lookup in bss section

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 24 15:16:29 PDT 2017


I suppose that's a reasonable concern.  I also didn't notice that this was
a unittest, I assumed it was a lit test.

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.

This way there's no input files of *any* kind.  Is this possible?

On Mon, Apr 24, 2017 at 3:09 PM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath added a comment.
>
> > We don't support running the test suite on Windows with MSVC.  We run it
> >  with clang targeting windows instead.  So anyone running the test suite
> on
> >  Windows is already using clang, and we can just specify a linux triple
> to
> >  get an ELF binary.
>
> 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.
>
> 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?
>
>
> https://reviews.llvm.org/D32434
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170424/1afd5e76/attachment.html>


More information about the lldb-commits mailing list