Displaying 20 results from an estimated 1000 matches similar to: "Using an MCStreamer Directly to produce an object file?"
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
llvm-dev,
Thanks so much in advance for any help, tips, or advice you may be able
to offer me. I'm going to try to avoid the big-picture description of
the project I'm working on, and only talk about the parts that I have
trouble with / currently need to implement. -- I've been starting by
taking the source code from the "llvm-mc" tool, and working that down
into a
2018 Apr 03
0
Problems using LLVM as a disassembler.
Hi,
I have been trying to use LLVM as a disassembler, thus providing a
small part of my decompiler that I am working on.
It currently decompiles from X86_64 binary.o -> LLVM IR.
It works with a small set of test programs so far, so cannot currently
handle large binary programs yet.
The problem is with the LLVM "getInstruction()" method.
It used to have a PC (program counter)
2014 Aug 06
4
[LLVMdev] Looking for ideas on how to make llvm-objdump handle both arm and thumb disassembly from the same object file
Hello Tim, Rafael, Renato and llvmdev,
I’m working to get llvm-objdump handle both arm and thumb disassembly from the same object file similarly to how darwin’s otool(1) works. And I’m looking for implementing direction. I spoke to Jim Grosbach about some ideas and he suggested I send out and email about some of the possibilities. Since none of the ones I could think of are pretty he thought
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
Hi,
I'm embarrassed that I can't figure this out... I have a compiler that
outputs my module in either .s assembly format or .obj binary format,
either one works just fine. But if I try to output both of them by adding
passes, LLVM throws an Assert:
void WinCOFFStreamer::EmitLabel(MCSymbol *Symbol) {
assert(Symbol->isUndefined() && "Cannot define a symbol
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
Hi Daniel,
attached is a patch that pushes most of the object file specific parsing
out of AsmParser and down into MachOAsmParser. This was done as a
cleanup for the ELF work. I know that you're not happy with this
approach, particularly the fact that as we add more object file formats
and assembler dialects, it's going to cause a class explosion. But I was
hoping that we could use this
2010 May 05
2
[LLVMdev] MCStreamer interface
On May 5, 2010, at 1:22 PM, Nathan Jeffords wrote:
> On Wed, May 5, 2010 at 11:15 AM, Chris Lattner <clattner at apple.com> wrote:
> On May 4, 2010, at 11:03 AM, Nathan Jeffords wrote:
> ... We basically want one MCStreamer callback to correspond to one statement in the .s file. This makes it easier to handle from the compiler standpoint, but is also very important for the llvm-mc
2010 May 05
0
[LLVMdev] MCStreamer interface
On Wed, May 5, 2010 at 11:15 AM, Chris Lattner <clattner at apple.com> wrote:
> On May 4, 2010, at 11:03 AM, Nathan Jeffords wrote:
> ... We basically want one MCStreamer callback to correspond to one
> statement in the .s file. This makes it easier to handle from the compiler
> standpoint, but is also very important for the llvm-mc assembly parser
> itself.
>
> This
2010 May 06
0
[LLVMdev] MCStreamer interface
>
>
> The logic to handle this has to go somewhere, putting it in the MCStreamer
> *implementation* that needs it is the most logical place. We also aim to
> implement an assembler, it doesn't make sense to duplicate this logic in the
> compiler and the assembler parser.
>
>
Assembly language has often been *the* intermediate form for between
compilers and object
2010 May 05
3
[LLVMdev] MCStreamer interface
On May 4, 2010, at 11:03 AM, Nathan Jeffords wrote:
> This is a brain-dump of my thoughts on the MCStreamer interface after several
> days of digging around trying to get a COFF writer working.
Great! Something that is worth pointing out is that the MCStreamer API is intended to directly reflect what is happening in .s files. We basically want one MCStreamer callback to correspond to one
2010 May 05
4
[LLVMdev] MCStreamer interface
On Wed, May 5, 2010 at 1:22 PM, Nathan Jeffords <blunted2night at gmail.com> wrote:
> I had a problem with MCStreamer::EmitCommonSymbol
> & MCStreamer::EmitLocalCommonSymbol. When I implemented them I assumed this
> meant to put those symbols into the .bss segment. This required me to get a
> hold of the TLOF from the streamer. I now realize this is wrong after
>
2010 May 04
2
[LLVMdev] MCStreamer itnerface
This is a brain-dump of my thoughts on the MCStreamer interface
after several
days of digging around trying to get a COFF writer working.
All fragments should be associated with a symbol. For assembler components,
a
unnammed "virtual" symbol can be used when there is no explicit label
defined.
Section assignment should be the responsiblity of the object imlementing the
MCStreamer
2010 May 07
0
[LLVMdev] MCStreamer interface
On Wed, May 5, 2010 at 5:53 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 5, 2010, at 5:22 PM, Nathan Jeffords wrote:
>>
>> The logic to handle this has to go somewhere, putting it in the MCStreamer
>> *implementation* that needs it is the most logical place. We also aim to
>> implement an assembler, it doesn't make sense to duplicate this
2011 May 30
0
[LLVMdev] how to emit machine code to custom MCStreamer
Hi!
I'd like to emit code to a custom MCStreamer instead of e.g. MCELFStreamer.
Unfortunately LLVMTargetMachine::addCommonCodeGenPasses is private
but I would need it, or even better a method simular to addPassesToEmitFile
(e.g. addPassesToEmitCustomMC) taking an MCSreamer would be great.
What do you think?
-Jochen
2010 May 07
1
[LLVMdev] MCStreamer interface
On 7 May 2010 08:15, Nathan Jeffords <blunted2night at gmail.com> wrote:
>
>
> On Fri, May 7, 2010 at 12:05 AM, Chris Lattner <clattner at apple.com> wrote:
>
>>
>> On May 6, 2010, at 11:22 PM, Nathan Jeffords wrote:
>>
>> Thanks! Funny, I was just preparing a patch to submit for my changes to
>> MCSectionCOFF. My changes look to be fairly
2010 May 06
2
[LLVMdev] MCStreamer interface
On May 5, 2010, at 5:22 PM, Nathan Jeffords wrote:
>
> The logic to handle this has to go somewhere, putting it in the MCStreamer *implementation* that needs it is the most logical place. We also aim to implement an assembler, it doesn't make sense to duplicate this logic in the compiler and the assembler parser.
>
>
> Assembly language has often been *the* intermediate
2010 May 07
0
[LLVMdev] MCStreamer interface
Thanks! Funny, I was just preparing a patch to submit for my changes to
MCSectionCOFF. My changes look to be fairly independent of yours, my change
was to deal with COMDAT's. I had dealt with the characteristics flags in the
object writer, but I like this. If you don't mind I would like to merge my
changes into this patch and submit it. I was just pondering how to deal with
the
2010 May 07
0
[LLVMdev] MCStreamer interface
On Fri, May 7, 2010 at 12:05 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 6, 2010, at 11:22 PM, Nathan Jeffords wrote:
>
> Thanks! Funny, I was just preparing a patch to submit for my changes to
> MCSectionCOFF. My changes look to be fairly independent of yours, my change
> was to deal with COMDAT's. I had dealt with the characteristics flags in the
>
2010 May 07
3
[LLVMdev] MCStreamer interface
On Wed, 2010-05-05 at 13:22 -0700, Nathan Jeffords wrote:
>
> The important point here is that the COFF MCSection needs to
> have the right level of semantic information. In fact,
> MCSection is the place that I'd start for COFF bringup.
>
> OK, I see that now. The current isolation
> between TargetLoweringObjectFile ->
2011 Dec 19
2
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi,
My apologies if this appears to be a very trivial question -- I have
tried to solve this on my own and I am stuck. Any assistance that
could be provided would be immensely appreciated.
What is the absolute bare minimum that I need to do to disassemble an
array of, say, ARM machine code bytes? Or an array of Thumb machine
code bytes? For example, I might have an array of unsigned chars --
how
2011 Dec 19
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi Aiden,
The easiest thing I can do is to point you to the source of the "llvm-mc" tool, which does exactly what you ask in its "-disassemble" mode. The code is rather small, so it should be easy to work out.
tools/llvm-mc
Cheers,
James
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Aidan Steele
Sent: