linux-mips
[Top] [All Lists]

Re: Clean up the mips dynamic linker

To: Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: Clean up the mips dynamic linker
From: "H . J . Lu" <hjl@lucon.org>
Date: Fri, 13 Jul 2001 11:14:25 -0700
Cc: linux-mips@oss.sgi.com, GNU C Library <libc-alpha@sourceware.cygnus.com>
In-reply-to: <20010713112635.A32010@bacchus.dhis.org>; from ralf@oss.sgi.com on Fri, Jul 13, 2001 at 11:26:36AM +0200
References: <20010712182402.A10768@lucon.org> <20010713112635.A32010@bacchus.dhis.org>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Fri, Jul 13, 2001 at 11:26:36AM +0200, Ralf Baechle wrote:
> On Thu, Jul 12, 2001 at 06:24:02PM -0700, H . J . Lu wrote:
> 
> > In fact, DT_MIPS_MAP_BASE_ADDR is the same as the p_addr field of the
> > first loadable segment in the program header. I think it is included
> > in the MIPS ABI to give the dynamic linker easy access to it.
> 
> Afair there is no requirement for loadable segments to be sorted so you'd
> have to go through all the program header table to find the one with the
> lowest address which isn't necessarily the first segment.
> 
> As the ABI doesn't give any guarantee that the lowest address in the segment
> table is the value of DT_MIPS_BASE_ADDR I just tried to find a binary on
> my IRIX boxen that violates this rule but I didn't find any.  So please,
> go ahead.

It doesn't matter. DT_MIPS_BASE_ADDR is the "Base Address" in the gABI.
glibc has to get the "Base Address" right. Otherwise, it won't work
correctly for all cases. It is not mips specific.


H.J.

<Prev in Thread] Current Thread [Next in Thread>