On Dec 9, 2007 11:26 AM, Carmelo Amoroso <[EMAIL PROTECTED]> wrote:
> Attached patch tries to fix it. The GNU_HASH part needs to be fixed 
> accordingly.
>
> Any comments ?

I think that should work.  Minor point:

> --- ldso/libdl/libdl.c  (revision 20633)
> +++ ldso/libdl/libdl.c  (working copy)
> @@ -723,8 +723,11 @@
>                 _dl_if_debug_print("Module \"%s\" at %p\n",
>                                    tpnt->libname, 
> DL_LOADADDR_BASE(tpnt->loadaddr));
>
> -               if (DL_ADDR_IN_LOADADDR((ElfW(Addr)) __address, tpnt, pelf))
> +               if (DL_ADDR_IN_LOADADDR((ElfW(Addr)) __address, tpnt, pelf)) {
>                         pelf = tpnt;
> +                       /* Found, stop looping */
> +                       break;
> +               }
>         }
>
>         if (!pelf) {

I don't think this change is necessary or correct.  With this change,
the code can exit having found any shared library mapped at any lower
address.  Instead, you need to iterate over all loaded ELF files to
find the nearest shared library mapped at a lower address (see the
comment for DL_ADDR_IN_LOADADDR in dl-defs.h).

Nickolai.
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to