LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2006, 01:48 PM   #1
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Rep: Reputation: 16
What is the difference between LSB and MSB executables?


I know that the former means Least Significant Bit and the latter - Most Sigificant Bit. But what is the difference between LSB and MSB? Is there a way to convert one to the other without recompiling? Here's an example of what I get for two files - one downloaded from the net (the 'rpm'), and one compiled on my machine. This is not the 'rpm' binary from /usr/bin, however.

Code:
[root@host /opt/rpm/bin]# ./rpm
bash: ./rpm: cannot execute binary file
[root@host /opt/rpm/bin]# file ./rpm
./rpm: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), not stripped
[root@host /opt/rpm/bin]# gcc hello.c -o hello
[root@host /opt/rpm/bin]# file hello
hello: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1, dynamically linked (uses shared libs), not stripped
[root@host /opt/rpm/bin]# ./hello
Hello World!
The trouble is that I don't have the source and until now I didn't find a way to get a copy of it. So that I'm asking about a way to convert LSB to MSB binaries without recopiling them... Hope someone could help
 
Old 04-01-2006, 02:27 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Basicaly the difference is the way numbers are stored. smallest or largest bit first.

i.e. A byte with 6 in it (Reading from left to right):
LSB 01100000
MSB 00000110

The problem you have is not that the executable is LSB rather than MSB its the fact that its compiled for a completely diffrent architecture, changes the bit order would be the least of your problems. It still wouldn't run.

You need the PowerPC version, not the Intel version.
 
Old 04-01-2006, 03:25 PM   #3
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
Quote:
You need the PowerPC version, not the Intel version.
Well, that's where my troubles start... 10x anyway
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LSB 2.0 - what is it? albean Linux - General 3 09-21-2004 10:46 AM
Lsb??? rm6990 Linux - General 3 09-15-2004 04:38 AM
redhat-lsb package nightwalker1945 Red Hat 1 05-06-2004 10:43 PM
lfs-5.0 with simpleinit-msb 1.2 behmjose Linux From Scratch 0 03-17-2004 03:33 AM
LSB 5amYan Linux - Distributions 3 06-06-2002 04:49 PM


All times are GMT -5. The time now is 07:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration