This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Re: Changed shared library loading strategy on PPC, why?
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?
Franz.