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

Jason Kim jasonwkim at google.com
Thu Oct 21 11:40:12 PDT 2010


On Thu, Oct 21, 2010 at 11:17 AM, Renato Golin <renato.golin at arm.com> wrote:
> 2010/10/21 Jason Kim <jasonwkim at google.com>:
>> Of the 45 remaining, there are 4 interesting uses in MCAsmStreamer.cpp
>> - (I suppose for emitting data constants in a cross platform manner)
>> The other remaining uses are in AsmPrinter, again to do cross platform things.
>> It seems a bit strange to use a high level hammer to do ballpeen
>> work..... But when in Rome.... :-)
>
> Hi Jason,
>
> Are you printing ELF symbols and sections with AsmPrinter? I was under

No. the code in question is regarding  the blobs in .ARM.attributes section :-)

> the impression that you'd create an MCPrinter to deal with the
> format-independent and only use AsmPrinter/ELFPrinter for specific
> calls (to AsmStreamer/ObjectStreamer).

Uhh, something like that? :-)
AFAIK,  The final assembly (ie. building the output) for file emission
is done via MCAssembler, with input  from a bunch of other classes.
The misnamed AsmPrinter hierarchy is responsible for most of the
format independent emission (i.e. the stuff that gets put inside the
sections) for both .o and .s
There is a MCStreamer hierarchy which takes care of recording the
sequential output of blobs (and there are format specific streamers
for ELF etc...)
There are also format specific helpers (ELF/Macho)Objectwriter which
fill in the format specific bits..

-jason

>
> Or maybe I got it all wrong...
>
> cheers,
> --renato
>



More information about the llvm-dev mailing list