What is i386 linux

Why do Linux world use the term i386 instead of x86?

I see the term i386 instead of x86 in many places related to Linux. As of my knowledge, they are not interchangeable. x86 is a family of instruction set architectures where i386 is a specific one of the x86 processors. But why do Linux world uses the term i386 instead of x86 ?
References:
x86 | Wikipeadia
Intel 80386 | Wikipeadia

There’s several answers which provide the details that OP wants to know, which also provide information that OP may not want to know.

@ThomasDickey thank you for pointing it out. I have read the answer multiple times. But I don’t think it answers the core question. As researched further on the internet, I could find an answer which I think is correct. Please check it out.

I’ve seen kernels compiled for, and labelled as, 386, 586, 686. I tend to assume that if something is labelled as 386 then it’s been compiled for that platform, without optimisations and instructions suitable for newer processors.

@roaima That is was I also thought at first. But it is little different sometimes. For instance, see this post from CentOS blog ( got from the comment posted by @muru) «The Alternative Architecture Special Interest Group (AltArch SIG) is happy to announce the release the x86 32-bit version of CentOS Linux 7. This architecture is also known as i386 or i686»

2 Answers 2

i386, or 80386, was the first 32-bit processor. When it was introduced, the word i386 is started to be using in many places, including in OSs and compilers, which made it impossible or very difficult to change later.

Even after the introduction of other advanced x86 processors, including the 486 and 586, many manufacturers didn’t bother to change the label i386 and started to use it as an alias for 32-bit x86 processor.

In addition to the 32-bit capability, the 80386 also introduced a lot of important features that were important for multitasking OSs, so backporting any code that uses these features to 80286 or older processes would require major changes. Other important features were introduced by the original Pentium and Pentium Pro chips, also known as i586 and i686; for example, 32-bit RHEL 6.x RPM packets have their architecture ID as .i686.rpm because they’ve been compiled to unconditionally use features of Pentium Pro and later chips, with no fallbacks for CPUs older than that.

The original Intel 8086, 80186, and 80286 were 16-bit processors. However, the 80386 aka i386 was the first 32-bit processor in the x86 line.

Читайте также:  Загрузочный диск линукс образ

The most logical name to refer to the 32-bit x86 architecture is x86_32, since it’s the 32-bit extension of the x86 architecture, and it matches the style of the x86_64 name which is the 64-bit extension of the x86 architecture.

The name x86 is a retronym. Intel did not give a name to their instruction set initially. They later gave it the name IA-32, adding to the confusion. Before an official name was given, different groups came up with different names.

  • Microsoft decided to call x86_32 as x86, and x86_64 as x64. Microsoft’s naming is why you’re used to seeing x86 refer to 32-bit x86.
  • Linux distros decided to call x86_32 as i386 after the first x86 chip that was 32-bit, and then they called x86_64 as amd64 after the first x86_64 chips that came from AMD to avoid confusion with Intel’s competing IA-64 (Itanium) architecture.
  • Apple decided to call x86_32 as i386 similarly to Linux distros, and then they called x86_64 as the logical name x86_64.

Источник

difference between i386:x64-32 vs i386 vs i386:x86_64

Can someone explain the difference between the three architectures? Actually when I built a 64-bit application in Linux, I got a link error saying:

skipping incompatible library.a when searching for library.a 
a.o: file format elf32-x86-64 architecture: i386:x64-32, flags 0x00000011: HAS_RELOC, HAS_SYMS start address 0x00000000 

Note that static libraries are generally far more trouble than they are worth. Use dynamic libraries, with an $ -relative -rpath if you really need to and don’t need setuid or any other capabilities .

2 Answers 2

There are 3 common ABIs usable on standard Intel-compatible machines (not Itanium).

  • The classic 32-bit architecture, often called «x86» for short, which has triples like i386-linux-gnu . Registers and pointers are both 32 bits.
  • The 64-bit extension originally from AMD, often called «amd64» for short, which has GNU triple of x86_64-linux-gnu . Registers and pointers are both 64 bits.
  • The new «x32» ABI, with a triple of x86_64-linux-gnux32 . Registers are 64 bits, but pointers are only 32 bits, saving a lot of memory in pointer-heavy workflows. It also ensures all the other 64-bit only processor features are available.

Each of the above has its on system call interface, own ld.so , own complete set of libraries, etc. But it is possible to run all 3 on the same kernel.

On Linux, their loaders are:

% objdump -f /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2 /lib/ld-linux.so.2: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x00000a90 /lib64/ld-linux-x86-64.so.2: file format elf64-x86-64 architecture: i386:x86-64, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x0000000000000c90 /libx32/ld-linux-x32.so.2: file format elf32-x86-64 architecture: i386:x64-32, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x00000960 

Now, if you’re getting the message about «skipping incompatible library», that means something is messed up with your configuration. Make sure you don’t have bad variables in the environment or passed on the command line, or files installed outside of your package manager’s control.

Читайте также:  Create table postgresql linux

Источник

Difference between the i386 download and the amd64?

What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu).

5 Answers 5

i386 refers to the 32-bit edition and amd64 (or x86_64) refers to the 64-bit edition for Intel and AMD processors.

The Intel 80386, also known as the i386, or just 386, was a 32-bit microprocessor introduced by Intel in 1985. This is termed x86, IA-32, or the i386-architecture, depending on context.

x86-64 is an extension of the x86 instruction set. It supports vastly larger virtual and physical address spaces than are possible on x86, thereby allowing programmers to conveniently work with much larger data sets. After launching the architecture under the «x86-64» name, AMD renamed it AMD64. x86-64 is still used by many in the industry as a vendor-neutral term, while others, notably Sun Microsystems (now Oracle Corporation) and Microsoft, use x64.

Even if you have an intel CPU, you should use AMD64 to install 64-bit on your computer (it uses the same instruction sets).

I highly recommend using it. For the most part you will not notice a difference but for large workloads (such as video editing, gaming, etc), the computer will perform faster (the computer has the ability to calculate 2+2+2=6 instead of having to do 2+2=4+2=6 in an example). In the Windows world, a 32-bit OS will not let you use more than 3.5 Gigs of RAM on your computer (even if you have 8!). You’d need to use a 64-bit OS in order to fully use all RAM. For Linux, however, there’s no such limit (thanks, Uri).

Regardless, the world has shifted from 32 bit and it’s only there to support older machines that are incapable of running 64 bit.

That last part, is now (in Linux of course) Just not true, you CAN use more than the 3.5GB of RAM with the PAE kernel in 32 bit .

For the sake of simplicity I have omitted technicalities such as the graphics card memory. My aim was to say «if you have more than 3.5-4 gigs, use 64 bit».

Читайте также:  Uninstalling nvidia drivers linux

64 bit is every bit as usable and stable as 32 bit with the almost negligible exception of Flash under certain circumstances during a certain time of day and if the planets align giving out cosmic rays.

The architecture is named after AMD because AMD invented it, with the Athlon 64. Similarly, the 32-bit i386 architecture is named after Intel’s 386 processor, because it was the first of its kind, but i386 will also work on AMD processors. So yes you can use that ISO image.

yes you can install amd64 bit to Intel 64 bit processor. AMD invented x86-64 bit instruction set processor so the name is just a tribute to AMD.

Thank you for clearing this up. I know it was a simple question, but I couldn’t find the answer anywhere.

The difference between amd64 and i386 is that amd64 is 64-bit while i386 is 32-bit. This is the width (in bits) of registers available in the core.

Basically the largest number that a 32-bit CPU core can handle in one go is a little over 4.29 billion while a 64-bit core can handle a number of a bit over 18.44 billion, billion.

The cores in modern PCs are capable of behaving as either a 64-bit or a 32-bit processor depending on which version of the operating system you have installed.

64-bit code tends to run faster than 32-bit code either because it can deal with bigger numbers in on go or because the 64-bit cores have more registers so can store more things without needing to put things in external memory. Though there is no guarantee that 64-bit code will run faster if the code has not been written to take advantage of the extra features of the processor.

Compiling on a 32-bit system will produce different code than a 64-bit system. You can prove this by compiling to assembly code on the two systems. Assuming your C file is myfile.c try gcc -S myfile.c on both systems and compare myfile.s

Well written code for a 32-bit system should compile and run on a 64-bit system but not all code is well written. Many programmers make assumptions about the system that may not be true: such as register width or byte order.

Without access to your source code it’s difficult to see what the problem is but a segmenation fault indicates that an attempt has been made to access memory that does not belong to the program. This may, for example, indicate that mem_ptr is a 32-bit pointer which is fine on a 32-bit system but needs to be a 64-bit pointer on a 64-bit system.

Источник

Оцените статью
Adblock
detector