llc - generation of native machine code

Hello!

I am working with LLVM project to compile for specific processor (xPEC-processor from NetX chip, http://hilscher.com/ ).

I have done support of this target successfully! Assembler code can be emitted with debug information. LLVM – great!)

But now I am looking for generation of machine code for my target. I have seen, that “llc” has option “-filetype”.

It has default value “-filetype=asm”, but has more values, as “-filetype=obj” and “-filetype=dynlib”.

“obj” is very interesting, but it till not supported L

My goal is generation of elf-file for my target, where can be placed machine instruction and debug information.

It is possible to create own tool to translate assembler file in “obj”, but in “llc” some steps are provided, maybe, for this conversions …

Can anybody help me with this way? On the web ( www.llvm.org ) there is not much information for this subject.

Where can I read information? Have somebody done generation of “obj”-file?

I will be glad for any information.

Sank you!

–Tema

Best regards,

Artem Rudskyy

http://www…uni-magdeburg.de/ieat/robotslab/

http://www.uni-magdeburg.de/

2009/7/27 Rudskyy <tema13tema@yahoo.de>

It is possible to create own tool to translate assembler file in “obj”, but in “llc” some steps are provided, maybe, for this conversions …

If you use LLC to create an asm file for your target, you can use your target’s native assembler to create the .o file from it.

Then, you should use your target’s native linker to create an ELF executable.

LLC currently does not support doing all these steps on its own.

There's work in progress to make this work properly, but it's still a
while off. See http://wiki.llvm.org/Direct_Object_Code_Emission .

-Eli

2009/7/27 Eli Friedman <eli.friedman@gmail.com>