LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-05-2003, 02:55 PM   #1
lf412
LQ Newbie
 
Registered: Feb 2003
Location: Maryland, USA
Distribution: YellowDog, RedHat
Posts: 7

Rep: Reputation: 0
binary file problem


I downloaded a linux elf binary file and tried to run it on my linux distribution, Yellow Dog, but get the error message cannot execute binary file.

The file is ELF 32-bit LSB executable, Intel 80386, statically linked, and stripped.

Is the problem because it's for Intel and not PPC? If so, is there any way I can get this program to run at all on PPC? Thanks.
 
Old 02-05-2003, 03:03 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Do you have the ELF libraries installed ? I'm not totally familiar with Yellow Dog and ELF binaries but I do know you should have the lib's installed in order to run most likely.
 
Old 02-05-2003, 03:11 PM   #3
0x0001
Member
 
Registered: Sep 2002
Distribution: Slackware 8.1
Posts: 84

Rep: Reputation: 15
Is it executable? Check with ls -la.
 
Old 02-05-2003, 03:18 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Architectures

Yeah, make sure you have support for ELF executables. I believe it's a configuration option in the kernel. If it's statically linked, then having ELF library support is not necessary as all the support code is included in the executable.

Beyond that, a most definite yes about the architecture difference. A program compiled for an Intel-based processor will NOT run on a PPC without some sort of help. It's the same reason why you download iso files of linux distributions for specific architectures; you can't install an i386 distribution on a PPC.

You have a handful of options (that I'm aware of):
1) Get an emulator for an i386 processor to run under your PPC
2) Get the source and compile it yourself
3) if you can only get the source on an i386, look at cross-compiling. Cross-compiling lets one architecture create an executable for another (i.e. an Intel processor creates an executable for the PPC).

The reason why an i386 executable won't run on a PPC is pretty simple: the command/instruction formats are not identical. For instance, a simple ADD instruction for a PPC might be interpreted as a DIVIDE operation for the i386.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically tell text file from binary file? Hosiah Linux - Software 3 05-31-2005 06:22 AM
binary file problem vrdhananjay Programming 3 02-08-2005 07:33 PM
problem in reading Microsoft word as a binary file ljqu_happy Programming 15 02-02-2005 11:10 AM
convert text file to binary excel file ust Linux - General 2 11-23-2004 03:33 AM
Problem running execute binary file zekko Linux - General 18 08-08-2003 07:14 PM


All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration