Why is Solaris big endian

3

... when Unix is little endian?

From Wikipedia, Solaris is based on Unix in some sense:

In 1987, AT&T and Sun announced that they were collaborating on a project to merge the most popular Unix variants on the market at that time: BSD, System V, and Xenix. This became Unix System V Release 4 (SVR4).

On September 4, 1991, Sun announced that it would replace its existing BSD-derived Unix, SunOS 4, with one based on SVR4. This was identified internally as SunOS 5, but a new marketing name was introduced at the same time: Solaris 2.

Lazer

Posted 2011-10-14T11:50:39.490

Reputation: 13 841

Very educational and informative http://www.amazon.com/Microprocessors-Programmers-View-Computing-Works/dp/0070166382

– Aki – 2011-10-14T12:08:46.803

Answers

11

Endianness is a property of the CPU, not the operating system. Solaris is normally big-endian because Suns used big-endian CPUs, while UNIX was originally little-endian because it ran on little-endian machines.

Today, common UNIX-derived operating systems such as Linux run on a wide variety of CPU architectures and can be either big- or little-endian depending on which architecture is in use. (See this question on ServerFault if you want to find out which way your *nix goes.)

Dave Sherohman

Posted 2011-10-14T11:50:39.490

Reputation: 5 143

In other words decisions made 20 years ago is the reason. – Ramhound – 2011-10-14T12:20:16.473

1@Ramhoud Essentially, yes. BUt your dates are a bit off. The original Unix was developed in 1969, on hardware released in 1965, so closer to 50 years ago then 20. – KeithB – 2011-10-14T13:47:14.413

Many processor architectures allow for selecting which endian-ness to use , e.g. ARM. – Julian – 2011-10-14T15:04:23.923

3Unix was designed from the beginning to be endian neutral. Solaris is not "normally big-endian" as it supports both big and little endian architectures. – jlliagre – 2011-10-15T05:44:29.793

10

Your assumptions are incorrect: Solaris is not big-endian, Unix is not little-endian.

Both depend on the CPU they are running on. Solaris on a big-endian SPARC CPU is big-endian, Solaris on a little-endian Intel or AMD CPU is little-endian. Solaris is one flavor of Unix, others similarly run either big-endian or little-endian depending on the CPU being used.

alanc

Posted 2011-10-14T11:50:39.490

Reputation: 1 032