tracecap/tracecap.so: wrong ELF class: ELFCLASS32

62 views
Skip to first unread message

saro g

unread,
Sep 1, 2014, 2:43:30 PM9/1/14
to bitblaz...@googlegroups.com
I am using ubuntu 12.04 64bit on a 64 bit machine. I followed the ubuntu 64bit 12.04 walktrough and installed Temu without errors. but my temu installation is very slow to be useful. My guest is a 32 bit ubuntu 12.04. image. I compiled qemu 0.09.1 from source and found that it works properly and with reasonable speed using the same image file.

At the qemu prompt after starting Temu if I type load_plugin tracecap/tracecap.so i get the foll error wrong ELF class: ELFCLASS32. I have installed  ia32-libs. Where am I going wrong

Stephen McCamant

unread,
Sep 2, 2014, 11:10:13 AM9/2/14
to bitblaz...@googlegroups.com
>>>>> "SG" == saro g <saro> writes:

SG> I am using ubuntu 12.04 64bit on a 64 bit machine. I followed the
SG> ubuntu 64bit 12.04 walktrough and installed Temu without
SG> errors. but my temu installation is very slow to be useful. My
SG> guest is a 32 bit ubuntu 12.04. image. I compiled qemu 0.09.1 from
SG> source and found that it works properly and with reasonable speed
SG> using the same image file.

It's expected that TEMU will run more slowly that QEMU once you
"enable_emulation", since that turns on a bunch of callbacks that can
run at every instruction and basic block (much less start collecting
traces). But before you start using TEMU's special features, its
performance should be quite similar to the QEMU version it was derived
from. In your case I wouldn't expect that to be very fast, since that
QEMU is too old to support KVM and the Ubuntu 12.04 host is probably
too new to support KQEMU. (To get a fast version of QEMU say for
initial setup of machine images, my suggestion would be to try the
Ubuntu-packaged version.)

SG> At the qemu prompt after starting Temu if I type l*oad_plugin
SG> tracecap/tracecap.so i get the foll error* wrong ELF class:
SG> ELFCLASS32. I have installed ia32-libs. Where am I going wrong

32-bit x86 code and 64-bit x86 code are incompatible within the same
process on Linux, even when the CPU is backwards
compatible. Installing ia32-libs (or in newer versions, i386
architecture packages) will help you run 32-bit binaries on a 64-bit
system, but nothing will allow you to load 32-bit libraries in a
64-bit process or vice-versa. TEMU plugins like tracecap run in the
same process as TEMU itself, so if your TEMU is 64-bit, your plugins
need to be too, as well as any libraries they use, and so on. This is
why when you build a 64-bit TEMU you also need to recompile Tracecap
from source, not use the 32-bit binary from TEMU 1.0.

Hope this helps,

-- Stephen

saro g

unread,
Sep 9, 2014, 12:51:15 PM9/9/14
to bitblaz...@googlegroups.com
Thank you very much. The mistake I made was that I did not sync the temu-0.1 folder with bitblaze additionals. I did a clean install after correcting my error. There was no error this time but I found Temu to be too slow to be useful. Even before I enable emulation.



杜远之

unread,
Jun 15, 2015, 12:56:12 PM6/15/15
to bitblaz...@googlegroups.com


在 2014年9月10日星期三 UTC+8上午12:51:15,saro g写道:
Thank you very much. The mistake I made was that I did not sync the temu-0.1 folder with bitblaze additionals. I did a clean install after correcting my error. There was no error this time but I found Temu to be too slow to be useful. Even before I enable emulation.



How do you solve this problem? Can you write down the process you have made? what's the meaning of "sync the temu-0.1 folder with bitblaze additionals"
did you mean that
    tar xvzf bitblaze-additional-2010-06.tar.gz
    mv bitblaze bitblaze-additional-2010-06
    cd temu-1.0
    rsync -rav ../bitblaze-additional-2010-06/temu/ .
but it still warn me with
"tracecap/tracecap.so: wrong ELF class: ELFCLASS32
 
Reply all
Reply to author
Forward
0 new messages