LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   running a x86 binary on ARM RPI hardware (https://www.linuxquestions.org/questions/linux-software-2/running-a-x86-binary-on-arm-rpi-hardware-4175445998/)

depam 01-17-2013 05:16 AM

running a x86 binary on ARM RPI hardware
 
I have one binary that works fine on x86 CentOS machine but to cut down costs and power, I just had myself a Raspberry PI which is based on ARM and Fedora Remix 17 installed. However, there is one binary that I really need to run. I am not sure if it was compiled in whatever language but it throws an error on me.

-bash: ./goipcron: cannot execute binary file

[root@raspi goip]# file goipcron
goipcron: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

I also tried installing gcc but it never really worked. Was wondering if there is a translator of some sort without installing any emulator of the whole OS (like qemu).

Any thoughts on this?

business_kid 01-17-2013 08:43 AM

The problem is this: A binary coded instruction is assembler. Different instruction sets means that any code is likely to preform one instruction in one system, and a totally different one in the other system. Further, if the x86 instruction takes operands (e.g. mov this, somewhere;) and the arm one doesn't, (e.g. nop) you will next execute the operands as instructions. That makes for magnificent crashes.
You need the emulator. If you get the source, however, you have a chance because you can compile for arm and have your own smelly rPi exe. You can even compile on the raspberry pi - at least with the debian image.

michaelk 01-17-2013 09:16 AM

As stated a compiled x86 executable will not run on an ARM processor. Other then compiling it on the PI itself you could setup a cross compiler development system on the x86 CentOS machine assuming you have all the source code etc.

depam 01-18-2013 10:04 PM

Thanks a lot for the response..


All times are GMT -5. The time now is 06:10 PM.