Page 1 of 1
Why 0x08048000?
Posted: Tue Nov 29, 2011 11:48 pm
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.
Re: Why 0x08048000?
Posted: Wed Nov 30, 2011 12:22 am
by Love4Boobies
Re: Why 0x08048000?
Posted: Wed Nov 30, 2011 12:24 am
by Nessphoro
Damn, I always though Linux was a Higher Half Kernel
Re: Why 0x08048000?
Posted: Wed Nov 30, 2011 1:59 am
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
Re: Why 0x08048000?
Posted: Wed Nov 30, 2011 11:49 pm
by CelestialMechanic
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!)
Re: Why 0x08048000?
Posted: Thu Dec 01, 2011 8:34 am
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...