[LLVMdev] Fwd: [llvm-commits] Fwd: Proof of concept patch for unifying the .s/ELF emission of .ARM.attributes

Jason Kim jasonwkim at google.com
Fri Oct 22 13:52:48 PDT 2010


---------- Forwarded message ----------
From: Jason Kim <jasonwkim at google.com>
Date: Fri, Oct 22, 2010 at 12:59 PM
Subject: Re: [llvm-commits] Fwd: Proof of concept patch for unifying
the .s/ELF emission of .ARM.attributes
To: Rafael Espíndola <rafael.espindola at gmail.com>


On Fri, Oct 22, 2010 at 12:51 PM, Jason Kim <jasonwkim at google.com> wrote:
> On Thu, Oct 21, 2010 at 11:42 AM, Rafael Espíndola
> <rafael.espindola at gmail.com> wrote:
>>> Also what is the preferred method for MC way of setting out subsection
>>> sizes after the fact? I am guessing I need to use an MCFixup?
>>> How do I get an MCExpr to evaluate a method for the subsection size?
>>> Is there an equivalent use in the places using MCFixup?
>>> Do I need to add a new subclass to MCExpr for doing this?
>>>
>>> JimG, can you please comment on the MachO specific parts in the
>>> ARMAsmPrinter.cpp? Is there an example of a "subsection size" that is
>>> "Fixed up" after all the blobs that go into that subsection are
>>> emitted? The closest examples I could find weren't that close :-(
>>> (Matter of fact, for ELF, it looks like the section sizes are actually
>>> calculated after everything has been processed by MCAssembler, and the
>>> headers sizes are not "fixed up" but completely rewritten from the
>>> beginning)
>>
>> I really don't follow. Please just convert the current patch to use
>> the existing APIs. If in the next one you really need a missing
>> feature it will be a lot easier to explain what it is.
>
> Hi Rafael
>
> Included are two patches. The first one s06-mod, is the original one.
> The s06-brk uses the high level Streamer interface, but currently does
> not pass the test I added.
>
> Please see the comments in the second patch. Hopefully it clarifies
> the issues in using the high level MCStreamer interface in emitting
> the .ARM.attributes ELF section directly.
> It does not seem worthwhile to use the high level Streamer interface
> for this kind of work,  so I'd very much like some feedback on what
> the preferred solution is.

Sigh. I sent an earlier patch by mistake for s06-brk. It does not
compile, but it should still suffice for demonstration purposes.
Sorry for the mess.

>
> Thanks!
> -jason
>




More information about the llvm-dev mailing list