Clint Adams wrote:
> On Sun, Feb 22, 2009 at 03:10:47AM -0200, Gerardo Exequiel Pozzi wrote:
>   
>> Breakpoint 1, *__GI___xstat (vers=3, name=0xb7ff71c1 "/dev/zero",
>>     
>
> Hrm, 3 means that I'm on the wrong track.
>
>   
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00000000 in ?? ()
>> (gdb) bt
>> #0  0x00000000 in ?? ()
>> #1  0xb7f66683 in tmp___xstat (ver=3, file_name=0xb7f251c1 "/dev/zero",
>>     
>
> That's odd.
>
>   
OK come back again, many hours on gdb, viewing memory, vars, tracing, etc...

The problem is... of course in libgl from nvidia (or how is linked/maked?)

fakeroot when uses dlsym(RTLD_NEXT, ...) @ load_library_symbols() in
normal operations returns the address of the desired function, but when
is linked with the bad nvidia, returns NULL, then jump to NULL!

A simple code can reproduce this:

[chroot32][djg...@gerardo ~]$ cat coco.c
#define _GNU_SOURCE
#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char *argv[])
{
        printf("%p\n", dlsym(RTLD_NEXT, "open"));
        return(0);
}
[chroot32][djg...@gerardo ~]$ gcc coco.c -o coco -ldl
[chroot32][djg...@gerardo ~]$ ./coco
0xb7fc33b0
[chroot32][djg...@gerardo ~]$ gcc coco.c -o coco -ldl -lGL
[chroot32][djg...@gerardo ~]$ ./coco
(nil)

I tried to replace RTLD_NEXT by RTLD_DEFAULT in dlsym() at
libfakeroot.c. but don't work. The only way to work is comenting #ifndef
RTLD_NEXT in get_libc() @ libfakeroot.c then uses the compatibility code
defined on it, forcing to load libc with dlopen().

-- 
Gerardo Exequiel Pozzi ( djgera )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to