OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 2:38 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Why 0x08048000?
PostPosted: Tue Nov 29, 2011 11:48 pm 
Offline
Member
Member

Joined: Mon Oct 11, 2010 11:37 pm
Posts: 52
Location: Milwaukee, Wisconsin
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.


Top
 Profile  
 
 Post subject: Re: Why 0x08048000?
PostPosted: Wed Nov 30, 2011 12:22 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
First Google hit: http://his.luky.org/ML/linux-kernel.2002/msg12171.html :roll:

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: Why 0x08048000?
PostPosted: Wed Nov 30, 2011 12:24 am 
Offline
Member
Member
User avatar

Joined: Sat Apr 30, 2011 12:50 am
Posts: 308
Damn, I always though Linux was a Higher Half Kernel


Top
 Profile  
 
 Post subject: Re: Why 0x08048000?
PostPosted: Wed Nov 30, 2011 1:59 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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.


Top
 Profile  
 
 Post subject: Re: Why 0x08048000?
PostPosted: Wed Nov 30, 2011 11:49 pm 
Offline
Member
Member

Joined: Mon Oct 11, 2010 11:37 pm
Posts: 52
Location: Milwaukee, Wisconsin
Love4Boobies wrote:

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.


Top
 Profile  
 
 Post subject: Re: Why 0x08048000?
PostPosted: Thu Dec 01, 2011 8:34 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7614
Location: Germany
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group