[PATCHs] Using the MC layer to produce dSYM companion binaries
Frédéric Riss via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 12:50:24 PDT 2015
> On Aug 7, 2015, at 12:12 PM, Pete Cooper <pete.cooper at gmail.com> wrote:
>
> 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.
Doh, looks like I sent out the result of git-format-patch rather than the actual patch… Here it is again (I hope)
Ferd
> So LGTM on both counts. Looking forward to the next patches to follow.
Thanks!
> Cheers,
> Pete
>
> On 5 August 2015 at 08:24, Frédéric Riss <friss at apple.com <mailto: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 <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <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/d28b4e0a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-machobjectwriter-more-generic.patch
Type: application/octet-stream
Size: 7608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150807/d28b4e0a/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150807/d28b4e0a/attachment-0001.html>
More information about the llvm-commits
mailing list