linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* why linux ELF base address is 0x8048000?
@ 2009-02-03  9:25 pei lin
       [not found] ` <73512bc10902032321n863a27by7ac63193dfc4488a@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: pei lin @ 2009-02-03  9:25 UTC (permalink / raw)
  To: linux-assembly

hi,
   why linux ELF base address is 0x8048000? we can use ld to change
the base address or linker script.BUT why default is 0x8048000? There
must be some reasons or history i don't know. Could u give me an
advice? Thx.


Best Regards.

P.L

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why linux ELF base address is 0x8048000?
       [not found] ` <73512bc10902032321n863a27by7ac63193dfc4488a@mail.gmail.com>
@ 2009-02-05  1:58   ` pei lin
  2009-02-05  2:59     ` Brian Raiter
  0 siblings, 1 reply; 4+ messages in thread
From: pei lin @ 2009-02-05  1:58 UTC (permalink / raw)
  To: Chris Evans; +Cc: linux-assembly

The article i read, but it does't explain my question about why linux
loads all elfs to this base address.

2009/2/4 Chris Evans <teknopup@gmail.com>:
> http://www.linux-tutorial.info/modules.php?name=MContent&pageid=327
>
>
> On Tue, Feb 3, 2009 at 1:25 AM, pei lin <telent998@gmail.com> wrote:
>>
>> hi,
>>   why linux ELF base address is 0x8048000? we can use ld to change
>> the base address or linker script.BUT why default is 0x8048000? There
>> must be some reasons or history i don't know. Could u give me an
>> advice? Thx.
>>
>>
>> Best Regards.
>>
>> P.L
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-assembly"
>> in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why linux ELF base address is 0x8048000?
  2009-02-05  1:58   ` pei lin
@ 2009-02-05  2:59     ` Brian Raiter
  2009-02-06  5:38       ` pei lin
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Raiter @ 2009-02-05  2:59 UTC (permalink / raw)
  To: pei lin; +Cc: Chris Evans, linux-assembly

>   why linux ELF base address is 0x8048000? we can use ld to change
> the base address or linker script.BUT why default is 0x8048000?
> There must be some reasons or history i don't know.

As far as I can tell, the reason is that this was the address used by
SVR4, which was the first release of Unix to use ELF executables.

The reason that SVR4 chose that particular address is that the stack
top was located at 0x08000000 (growing downward, of course), and then
the area between 0x08000000 and 0x08048000 was reserved for libc and
possibly other system service code.

b

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: why linux ELF base address is 0x8048000?
  2009-02-05  2:59     ` Brian Raiter
@ 2009-02-06  5:38       ` pei lin
  0 siblings, 0 replies; 4+ messages in thread
From: pei lin @ 2009-02-06  5:38 UTC (permalink / raw)
  To: Brian Raiter; +Cc: Chris Evans, linux-assembly

yeah,that explains some reason. But between 0x08000000 and 0x08048000
should be some other reason for X86 architecture . <<The linker and
loader>> said that "permitting most programs to use a single
second-level page table."

But i can not understand it very well.

Lin

2009/2/5 Brian Raiter <breadbox@muppetlabs.com>:
>>   why linux ELF base address is 0x8048000? we can use ld to change
>> the base address or linker script.BUT why default is 0x8048000?
>> There must be some reasons or history i don't know.
>
> As far as I can tell, the reason is that this was the address used by
> SVR4, which was the first release of Unix to use ELF executables.
>
> The reason that SVR4 chose that particular address is that the stack
> top was located at 0x08000000 (growing downward, of course), and then
> the area between 0x08000000 and 0x08048000 was reserved for libc and
> possibly other system service code.
>
> b
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-06  5:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-03  9:25 why linux ELF base address is 0x8048000? pei lin
     [not found] ` <73512bc10902032321n863a27by7ac63193dfc4488a@mail.gmail.com>
2009-02-05  1:58   ` pei lin
2009-02-05  2:59     ` Brian Raiter
2009-02-06  5:38       ` pei lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).