[llvm-dev] ELF object writing from assembly file
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 13 06:02:43 PDT 2015
On 13 October 2015 at 02:19, Sky Flyer via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I tried this commands, but it didn't work corrctly:
> llvm-mc -filetype=obj -arch=test file.s -o=a.o
That looks right to me ("-triple test-elf" might be more robust and
work if you're coding on OS X or Windows).
> and I think after an obj file is built, I should use this command but I am
> not sure!
> llvm-objdump -arch=test a.o
Either llvm-objdump or llvm-readobj will work. llvm-readobj tends to
produce lower level information, while llvm-objdump is more
user-friendly. They ought to mostly work on the generic information
If you want "-d" (disassemble) to work, you're going to have to
implement a Disassembler in your target too.
More information about the llvm-dev