Why 0x08048000?

Programming, for all ages and all languages.
Post Reply
CelestialMechanic
Member
Member
Posts: 52
Joined: Mon Oct 11, 2010 11:37 pm
Location: Milwaukee, Wisconsin

Why 0x08048000?

Post by CelestialMechanic »

Why was 0x08048000 chosen as the initial execution address for ELF binaries, at least in Linux? It is such a strange number, very round but not too round.

I've Googled it but just haven't been able to find anything on that question in the mass of returned results.
Microsoft is over if you want it.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Why 0x08048000?

Post by Love4Boobies »

"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: Why 0x08048000?

Post by Nessphoro »

Damn, I always though Linux was a Higher Half Kernel
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Why 0x08048000?

Post by Brendan »

Hi,
Nessphoro wrote:Damn, I always though Linux was a Higher Half Kernel
Linux is a higher half kernel. They're looking at normal processes that start at virtual address 0x08048000, and the person that said "The kernel is mapped into the virtual address-space below about 0x08000000." is wrong (if that was the case, then the kernel would be overwritten by processes).

I'm not too sure exactly where the Linux kernel is mapped on 32-bit systems (I think it depends on compile-time settings). It might be at 0x80000000 in some/most cases (which is easy to confuse with 0x08000000 - maybe a typo was involved).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
CelestialMechanic
Member
Member
Posts: 52
Joined: Mon Oct 11, 2010 11:37 pm
Location: Milwaukee, Wisconsin

Re: Why 0x08048000?

Post by CelestialMechanic »

Love4Boobies wrote:First Google hit: http://his.luky.org/ML/linux-kernel.2002/msg12171.html :roll:
Thanks, but (as others have pointed out) the Linux kernel is mapped well above this address, at either 0x8000_0000 or 0xC000_0000.

The address in question is 0x0804_8000. Why was such a weird address chosen? Maybe it was chosen by someone fond of the Intel 8048 microcontroller? (Yes, I know that is really stretching!)
Microsoft is over if you want it.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Why 0x08048000?

Post by Solar »

The address appears in the System V i386 ABI, I've been able to trace it back that far. No idea on the reason, though.

Sidenote: This would be better posted to LKML or Stackoverflow. Don't expect hard answers, though, this question has been around before...
Every good solution is obvious once you've found it.
Post Reply