[llvm-dev] invalid signature error (old bitcode, new tools)

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 15 17:33:32 PST 2016

Hi Muhammad,

On 15 February 2016 at 16:57, Muhammad Umar Janjua via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> It was  GNU C version 3.4-llvm 20030924 (experimental) (i686-pc-linux-gnu)
> ; compiled by GNU C version 3.4.0.

I think this means it was an unspecified version of LLVM linked to
something close to GCC 3.4. So starting with LLVM 3.4 (much much
newer) is problematic.

> However, I am seeing an invalid bitcode signature error.

In summer 2007 we changed LLVM IR's binary representation. Before that
it was called "bytecode", after that "bitcode". Soon afterwards,
support for reading bytecode was removed.

So the chances are your files are in this older format which nothing
newer than 2007 can read. Unfortunately, I think (it was before my
time, so rumour only) that bytecode was less backwards-compatible than
bitcode too.

So what you probably actually want the closest version match possible
to what produced that file. All the releases from 1.0-1.9 seem like
candidates, based on the date above. And even 1.0 may be too new.

Again unfortunately, we have the perfect trifecta: official Windows
releases don't go back that far; the Linux binaries don't seem to
contain a disassembler anyway; and the source doesn't build with
modern compilers.

Unless anyone has better ideas, your best option is probably to create
an ancient Linux VM and try to rebuild the source versions. Tedious
work, but those files are near prehistoric.



More information about the llvm-dev mailing list