bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlerror sets errno to ENOSYS


From: Diego Nieto Cid
Subject: Re: dlerror sets errno to ENOSYS
Date: Tue, 8 Mar 2016 17:18:56 -0300
User-agent: Mutt/1.5.24 (2015-08-30)

Hi

On Mon, Mar 07, 2016 at 08:45:59PM -0300, Diego Nieto Cid wrote:
> 
> I'm not sure what's going on. I've made some simple tests trying
> to imitate the setup but weak symbols were correctly overriden.
>

Well, this is weird. I added a call to cthread_getspecific to the
test program, and now there are two definitions of that function.

    diego@hird:~/src/test-cases/dlopen-error$ gdb ./main.pthread
    GNU gdb (Debian 7.10-1+b1) 7.10
    ...
    Reading symbols from ./main.pthread...done.
    (gdb) break cthread_getspecific
    Breakpoint 1 at 0x8048590
    (gdb) run
    Starting program: /home/diego/src/test-cases/dlopen-error/main.pthread
    [New Thread 1119.5]

    Breakpoint 1, cthread_getspecific (key=0, val=0x2003ce8)
        at ./pthread/cthreads-compat.c:68
    68      {
    (gdb) bt
    #0  cthread_getspecific (key=0, val=0x2003ce8)
        at ./pthread/cthreads-compat.c:68
    #1  0x080486f2 in main (argc=1, argv=0x2003d84) at main.c:16
    (gdb) c
    Continuing.
    0x128d688

    Breakpoint 1, cthread_getspecific (key=-1, pval=0x2003c8c)
        at ../sysdeps/mach/hurd/cthreads.c:42
    42        *pval = NULL;
    (gdb) bt
    #0  cthread_getspecific (key=-1, pval=0x2003c8c)
        at ../sysdeps/mach/hurd/cthreads.c:42
    #1  0x0109068a in __libc_getspecific (key=-1)
        at ../sysdeps/mach/hurd/cthreads.c:69
    #2  0x01034218 in __dlerror () at dlerror.c:74
    #3  0x08048737 in main (argc=1, argv=0x2003d84) at main.c:23
    (gdb) c
    ...

>From the main function, the pthread implementation is called but
from libdl the implementation provided by libc is used.

Thanks,
Diego



reply via email to

[Prev in Thread] Current Thread [Next in Thread]