llvm-gcc arm support

Hi

I am new to llvm. I would like to know if options like dwarf,splitsections,apcs,endianness etc which are supported by rvct and ads compilers for arm are supported by llvm-gcc or clang…
Am trying to compile a code for ARM architecture, armv6 in specific on an x86 machine.

Vinitha

I am new to llvm. I would like to know if options like
dwarf,splitsections,apcs,endianness etc which are supported by rvct and ads
compilers for arm are supported by llvm-gcc or clang..

Hi Vinitha,

Of course not all RVCT features are supported by LLVM, but general
support is good enough for most applications.

Specifically, dwarf support is good for most C applications, APCS and
AAPCS has good support, but we lack decent tests, so I won't be
surprised if you find regressions.

In theory, target data supports big-endian, but I have never tested,
TBH. Also, there's no way (that I know) to specify data/code
big-endian separately.

AFAIK, LLVM does not support split_sections, but it does support GNU's
"section" attribute.

Am trying to compile a code for ARM architecture, armv6 in specific on an
x86 machine.

There is ARMv6 support in LLVM, and cross-compilation is possible
(given a bit of work here and there) on both clang and llvm-gcc.

Give it a try and we can go over each separate problem you have, one by one.

cheers,
--renato

What is the .s file in context of llvm? Is it the assembly file with respect to llvm? Is it different from the normal .asm file?
And how to we convert a normal .asm assembly file to .o using llvm? Llvm-as is for the llvm .s file right?
When I try to compile a simple assembly file using llvm-as it says expected top level entity..and llvm-mc throws syntax errors..

Vinitha

llvm-as converts LLVM IR in text into LLVM IR in bitcode. You can use platform specific assembler to convert assembly file into an object file. llvm-mc can be used to emit object files.