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: shared lib problem on PPC (was: Re: glibc 2.1.92 tst-getdate failure on linuxppc)


Works just fine for me on x86.

>    testdat = dlsym(sohandle, "testdat");
>    if (testdat->next == -1) abort();

If this test fails it means that the module didn't actually get
unloaded.  Please note that there is no requirement in the specs that
this actually happens, programs relying on this are broken.  Anyhow,
glibc tries to unload a module completely.  What does LD_DEBUG=files
produce?  Should be something like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28440:
28440:  file=libdl.so.2;  needed by ./testshareddata
28440:  file=libdl.so.2;  generating link map
28440:    dynamic: 0x4001bea8  base: 0x40019000   size: 0x00002f8c
28440:      entry: 0x4001abf0  phdr: 0x40019034  phnum:          5
28440:
28440:
28440:  file=libc.so.6;  needed by ./testshareddata
28440:  file=libc.so.6;  generating link map
28440:    dynamic: 0x4013e9b4  base: 0x4001c000   size: 0x001269c8
28440:      entry: 0x40037900  phdr: 0x4001c034  phnum:          5
28440:
28440:
28440:  calling init: /lib/libc.so.6
28440:
28440:
28440:  calling init: /lib/libdl.so.2
28440:
28440:
28440:  initialize program: ./testshareddata
28440:
28440:
28440:  transferring control: ./testshareddata
28440:
28440:  file=./shareddata.so;  generating link map
28440:    dynamic: 0x4014488c  base: 0x40143000   size: 0x00001940
28440:      entry: 0x40143680  phdr: 0x40143034  phnum:          3
28440:
28440:
28440:  calling init: ./shareddata.so
28440:
28440:
28440:  calling fini: ./shareddata.so
28440:
28440:  file=./shareddata.so;  generating link map
28440:    dynamic: 0x4014488c  base: 0x40143000   size: 0x00001940
28440:      entry: 0x40143680  phdr: 0x40143034  phnum:          3
28440:
28440:
28440:  calling init: ./shareddata.so
28440:
28440:
28440:  calling fini: ./shareddata.so
28440:
28440:
28440:  calling fini: /lib/libdl.so.2
28440:
28440:
28440:  calling fini: /lib/libc.so.6
28440:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can see that the module is unloaded and reloaded.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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