This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Re: Changed shared library loading strategy on PPC, why?


> Mailing-List: contact libc-alpha-help@sourceware.cygnus.com; run by ezmlm
> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-geoffk=cygnus.com@sources.redhat.com>
> List-Subscribe: <mailto:libc-alpha-subscribe@sources.redhat.com>
> List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
> List-Post: <mailto:libc-alpha@sources.redhat.com>
> List-Help: <mailto:libc-alpha-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
> Date: Fri, 22 Jun 2001 17:00:45 +0200
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Cc: Ulrich Drepper <drepper@redhat.com>, libc-alpha@sources.redhat.com
> 
> At 13:15 22.06.2001, Jakub Jelinek wrote:
> >On Mon, Jun 18, 2001 at 10:24:54AM +0200, Franz Sirl wrote:
> > > Hi,
> > >
> > > it seems someone changed the library loading strategy on PPC, which
> > > certainly has a performance impact. So I would like to know why this had
> > > been done and if it was done on purpose at all.
> > >
> > > On PPC before the change the address scheme was like that:
> > >
> > > executable at 0x10000000
> > > shared lib first load below that, and if that space runs out, loading
> > > continues below 0x70000000.
> > >
> > > Now, it seems that loading starts immediately below 0x70000000, leaving 
> > the
> > > space with optimal relocations below 0x10000000 unused.
> >
> >Apparently powerpc's ELF_PREFERRED_ADDRESS relies on executable's l_map_end
> >== ~0UL.
> >Does following patch help?
> >Perhaps the test could be l == _dl_loaded instead of
> >l->l_type == lt_executable...
> >
> >2001-06-22  Jakub Jelinek  <jakub@redhat.com>
> >
> >         * sysdeps/powerpc/dl-machine.c (__elf_preferred_address): Prefer
> >         gaps below main executable.
> 
> This patch works fine for me, it passes glibc and binutils make check and 
> works fine if the new glibc is installed. I also tried your l == _dl_loaded 
> suggestion a bit on an uninstalled glibc and it seems to work fine too. I 
> leave the decision on which variant to install to you, maybe Geoff has a 
> preference?

The right test is the one which duplicates the kernel's
behaviour---the idea is to allow space for the break.

Anyway, all the patches look fine to me.  It's only a heuristic,
it's known to break for various reasons, the important thing is that
it works most of the time.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]