[LLVMdev] llvm-ld file not recognized: File format not recognized

Tim Northover t.p.northover at gmail.com
Thu Oct 10 06:13:47 PDT 2013


Hi,

> When using llvm-ld to link .bc files(compiled with llvm-gcc with option
> --emit-llvm), I went into error like: file not recognized: File format not
> recognized.
>
> I was confused because llvm-ld is the LLVM linker to link llvm bitcode files
> together, then why this error occurred?
>
> I am using llvm 2.9 and the corresponding binary version of llvm-gcc.

Unfortunately, both llvm-gcc and llvm-ld are dead these days.

I'm assuming you're on some OS X variant, in which case the preferred
replacement for llvm-gcc is Clang. Dragonegg is a replacement GCC/LLVM
bridge, primarily designed to allow people to run code in non-C/C++
languages that GCC supports (Fortran, Ada, ...).

For llvm-ld, the task of linking together .bc files is now done by
llvm-link. For its other features you'll want your system linker.

Cheers.

Tim.



More information about the llvm-dev mailing list