LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is 'architecture' in 'binary for an architecture'?multiple architecture support? (http://www.linuxquestions.org/questions/linux-newbie-8/what-is-architecture-in-binary-for-an-architecture-multiple-architecture-support-819085/)

wagaboy 07-10-2010 09:47 AM

what is 'architecture' in 'binary for an architecture'?multiple architecture support?
 
I have come across several websites that have compiled binaries available for download. Target architecture is also specified with these binaries, which brings to my question: what decides an architecture ?
I'm guessing it's OS+CPU, provided all the libraries for binary are available. Is this right or is it more than just these two, like GPU, motherboard, etc...

At the risk of being scorned, I'd like to ask another question which is somewhat related to another thread that I posted earlier(link): Is is possible to have a binary which supports multiple architecture.
I have googled and read some articles about "fat binaries", but it seems it is still a theory, and I haven't seen any implementations.

DavidMcCann 07-10-2010 10:34 AM

Architecture is purely the type of CPU. i386 is any Intel-compatible from the 386 onwards, i686 is a Pentium-compatible, x86_64 is a 64-bit Intel-compatible, and so on.

The nearest thing to multi-architecture binaries would be running an i386 version on i686, or 32-bit software on a 64-bit system. You couldn't have the same binary software for two unrelated systems; the same number means completely different instructions to 1386 and ARM chips, for example.

wagaboy 07-10-2010 11:18 AM

Quote:

Architecture is purely the type of CPU. i386 is any Intel-compatible from the 386 onwards, i686 is a Pentium-compatible, x86_64 is a 64-bit Intel-compatible, and so on.
I think architecture is dependent on the OS running on the system. For e.g., 'uname -a' returns different architecture depending on whether the OS is 32 or 64 bit. So I'm sure it has to be at least OS+CPU.

UPDATE:
Does architecture refer to the signature of 'file <binary>' cmd ?
e.g.
Code:

$ file sqlite3
sqlite3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped

Does kernel version also decide the architecture ?

Quote:

the same number means completely different instructions to 1386 and ARM chips, for example.
Is it possible group binaries for different architectures into a single binary ?


All times are GMT -5. The time now is 12:11 AM.