invalid bytecode signature

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

invalid bytecode signature

Ryan M. Lefever
I am trying to disassemble some bytecode using llvm-dis:
llvm-dis -f -o llvmtest/sliceme2.cbc.ll llvmtest/sliceme2.cbc

However, I am getting the following error.

llvm-dis: Invalid bytecode signature: 464C457F (Vers=0, Pos=4)

How do I go about figuring out what the problem is?
llvmtest/sliceme2.cbc is newly compiled using the same version of
llvm-gcc as llvm-dis.

--
Ryan M. Lefever  [http://www.ews.uiuc.edu/~lefever]
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: invalid bytecode signature

Reid Spencer-2
Hi Ryan,

On Fri, 2006-12-01 at 18:06 -0600, Ryan M. Lefever wrote:
> I am trying to disassemble some bytecode using llvm-dis:
> llvm-dis -f -o llvmtest/sliceme2.cbc.ll llvmtest/sliceme2.cbc
>
> However, I am getting the following error.
>
> llvm-dis: Invalid bytecode signature: 464C457F (Vers=0, Pos=4)

The problem is most likely that sliceme2.cbc is *not* bytecode. Open the
file and see. This message is checking for llvm or llvc (bytecode
signature) in the first four bytes of the file. Its not finding it and
reporting an error.
>
> How do I go about figuring out what the problem is?

Edit the file (don't cat it, or you'll mess up your screen settings if
it is bytecode).

> llvmtest/sliceme2.cbc is newly compiled using the same version of
> llvm-gcc as llvm-dis.

Okay, this is the problem :)

llvm-gcc4 doesn't emit bytecode any more. It emits object code, just
like plain-old-gcc.

If you want it to emit bytecode or llvm assembly, pass -emit-llvm

Reid.

>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: invalid bytecode signature

Ryan M. Lefever-2
Thank you for the help.  There seem to be several things in my makefiles
that are messed up as a result of switching from the gcc3.4 front end to
the gcc4 frontend.  Is there any documentation listing the things that
have changed?

Thanks,
Ryan

Ryan M. Lefever  [http://www.ews.uiuc.edu/~lefever]

On Fri, 1 Dec 2006, Reid Spencer wrote:

> Hi Ryan,
>
> On Fri, 2006-12-01 at 18:06 -0600, Ryan M. Lefever wrote:
>> I am trying to disassemble some bytecode using llvm-dis:
>> llvm-dis -f -o llvmtest/sliceme2.cbc.ll llvmtest/sliceme2.cbc
>>
>> However, I am getting the following error.
>>
>> llvm-dis: Invalid bytecode signature: 464C457F (Vers=0, Pos=4)
>
> The problem is most likely that sliceme2.cbc is *not* bytecode. Open the
> file and see. This message is checking for llvm or llvc (bytecode
> signature) in the first four bytes of the file. Its not finding it and
> reporting an error.
>>
>> How do I go about figuring out what the problem is?
>
> Edit the file (don't cat it, or you'll mess up your screen settings if
> it is bytecode).
>
>> llvmtest/sliceme2.cbc is newly compiled using the same version of
>> llvm-gcc as llvm-dis.
>
> Okay, this is the problem :)
>
> llvm-gcc4 doesn't emit bytecode any more. It emits object code, just
> like plain-old-gcc.
>
> If you want it to emit bytecode or llvm assembly, pass -emit-llvm
>
> Reid.
>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: invalid bytecode signature

Chris Lattner
On Fri, 1 Dec 2006, Ryan M. Lefever wrote:
> Thank you for the help.  There seem to be several things in my makefiles
> that are messed up as a result of switching from the gcc3.4 front end to
> the gcc4 frontend.  Is there any documentation listing the things that
> have changed?

Nope, unfortunately there isn't.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: invalid bytecode signature

Ralph Corderoy
In reply to this post by Ryan M. Lefever

Hi Ryan,

> llvm-dis: Invalid bytecode signature: 464C457F (Vers=0, Pos=4)

That's hex for `F', `L', `E', which backwards spells `ELF', so it looks
like an executable file.  Try running file(1) on it.

Cheers,


Ralph.


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev