[PATCHs] Using the MC layer to produce dSYM companion binaries

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 12:12:37 PDT 2015


Hey Fred

The first patch is fine.  I've been investigating whether individual
emitters for formats can have more control over the layout.  This patch is
actually similar to what I was doing (for those interested, I was trying to
see if laying out a function at a time on MachO would be a good idea as
then the relocations in the function can be resolved immediately without
creating fixups).

The second patch appears to just be formatting.  I don't see the 'tad more
generic' you mention.  The patch is itself good cleanup if you are going to
be making more changes to the code anyway.

So LGTM on both counts.  Looking forward to the next patches to follow.

Cheers,
Pete

On 5 August 2015 at 08:24, Frédéric Riss <friss at apple.com> wrote:

> Hi,
>
> I’m directly and indirectly using the MC layer to produce the content of
> the debug sections in llvm-dsymutil. This works great, except that dsymutil
> is supposed to produce dSYM companion binaries and not the simple object
> files MC was designed to produce.
>
> At some point I contemplated making MC generic enough to emit these kind
> of binaries, but it just feels like a bad fit. Moreover dSYM companion
> binaries have a number of unique characteristics that I think would fit
> pretty badly into any kind of generic framework (eg. fake sections that
> have a size but no contents or VM layout without any loadable sections).
>
> I went the route of writing my own equivalent of the MCObjectWriter in
> llvm-dsymutil which was easy enough. Today the layout of the sections and
> the file emission is done inside MCAssembler::Finish(). For my usecase, I
> want to run only the section layout and do the emission myself. The first
> attached patch allows that by splitting a layout(MCAsmLayout &) method out
> of MCAssembler::Finish(). Does this look reasonable?
>
> I also tried to reuse some low-level MachObjectWriter primitives. The
> second patch attached allows me to do just that by making them a tad more
> generic.
>
> Both patches should have NFC.
>
>
>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150807/8c7bc03e/attachment.html>


More information about the llvm-commits mailing list