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)


> This is strange.  It's certainly wrong that add_dependency is called
> since it is a dependency to the object itself.  In dl-lookup.c you'll
> see that calls to add_dependency are protected by
>  
>         if (__builtin_expect (current_value.m->l_global, 0)
>             && (__builtin_expect (current_value.m->l_type, lt_library)
>                 == lt_loaded)
>             && undef_map != current_value.m
>  
>  
> The last expressions "undef_map != current_value.m" should be false in
> your case.  If you can step through the dlsym() call (this is where
> the dependency will be added) and can show me what the values of the
> participating variables are that would help.  Again, undef_map should
> be the one loaded and current_value.m as well.

Starting program: /home/fsirl/./testshareddata
 
Breakpoint 1, main () at testshareddata.c:17
17         sohandle = dlopen("./shareddata.so", RTLD_NOW | RTLD_GLOBAL);
(gdb) n
19         testdat = dlsym(sohandle, "testdat");
(gdb) b dl-lookup.c:214
Breakpoint 10 at 0x30008aa0: file dl-lookup.c, line 214.
(gdb) c
Continuing.
 
Breakpoint 10, _dl_lookup_symbol (undef_name=0x10000708 "testdat",
undef_map=0x30026b88, ref=0x7ffff9f8, symbol_scope=0x10010a48,
reloc_type=0) at dl-lookup.c:214
214             if (__builtin_expect (current_value.m->l_global, 0)
(gdb) p undef_map
$10 = (struct link_map *) 0x30026b88
(gdb) p current_value.m
$11 = (struct link_map *) 0x100108e8
(gdb) p *undef_map
$12 = {l_addr = 268292096, l_name = 0x30026b78 "/lib/libdl.so.2", l_ld =
0xffef048, l_next = 0x30026d58, l_prev = 0x30026720, l_libname =
0x30026d20, l_info = {0x0,
    0xffef048, 0xffef098, 0xffef090, 0xffef068, 0xffef070, 0xffef078,
0xffef0b0, 0xffef0b8, 0xffef0c0, 0xffef080, 0xffef088, 0xffef058,
0xffef060, 0xffef050, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xffef0a0, 0x0, 0x0, 0xffef0a8, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffef0e0, 0xffef0d8, 0xffef0d0,
0xffef0c8,
    0x0 <repeats 11 times>, 0xffef0e8, 0x0, 0x0, 0x0}, l_phdr =
0xffdd034, l_entry = 268299616, l_phnum = 5, l_ldnum = 22, l_searchlist
= {r_list = 0x0, r_nlist = 0,
    r_duplist = 0x0, r_nduplist = 0}, l_symbolic_searchlist = {r_list =
0x0, r_nlist = 0, r_duplist = 0x0, r_nduplist = 0}, l_loader =
0x30026720, l_nbuckets = 94,
  l_buckets = 0xffdd0fc, l_chain = 0xffdd274, l_opencount = 1, l_type =
lt_library, l_relocated = 1, l_init_called = 1, l_global = 1, l_reserved
= 0,
  l_phdr_allocated = 0, l_nversions = 8, l_versions = 0x3001d000,
l_rpath_dirs = 0x0, l_reloc_result = 0x0, l_versyms = 0xffdddc2,
l_origin = 0x30026d38 "/lib",
  l_map_start = 268292096, l_map_end = 268366520, l_scope = {0x30026818,
0x30026818, 0x0, 0x0}, l_local_scope = {0x30026c80, 0x0}, l_dev = 773,
l_ino = 33035,
  l_runpath_dirs = 0x0, l_initfini = 0x30026f18, l_reldepsmax = 0,
l_reldepsact = 0, l_reldeps = 0x0, l_feature_1 = 0, l_flags_1 = 0}
(gdb) p *current_value.m
$13 = {l_addr = 266903552, l_name = 0x100108d0 "./shareddata.so", l_ld =
0xfe9a8e8, l_next = 0x0, l_prev = 0x30026558, l_libname = 0x10010a88,
l_info = {0x0,
    0xfe9a8e8, 0xfe9a930, 0xfe9a928, 0xfe9a900, 0xfe9a908, 0xfe9a910,
0xfe9a948, 0xfe9a950, 0xfe9a958, 0xfe9a918, 0xfe9a920, 0xfe9a8f0,
0xfe9a8f8, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0xfe9a938, 0x0, 0x0, 0xfe9a940, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe9a968, 0xfe9a960, 0x0 <repeats 13
times>, 0xfe9a970, 0x0,
    0x0, 0x0}, l_phdr = 0xfe8a034, l_entry = 266905236, l_phnum = 3,
l_ldnum = 19, l_searchlist = {r_list = 0x10010b40, r_nlist = 3,
r_duplist = 0x10010b40,
    r_nduplist = 3}, l_symbolic_searchlist = {r_list = 0x0, r_nlist = 0,
r_duplist = 0x0, r_nduplist = 0}, l_loader = 0x0, l_nbuckets = 37,
l_buckets = 0xfe8a09c,
  l_chain = 0xfe8a130, l_opencount = 1, l_type = lt_loaded, l_relocated
= 1, l_init_called = 1, l_global = 1, l_reserved = 0, l_phdr_allocated =
0, l_nversions = 4,
  l_versions = 0x10010b60, l_rpath_dirs = 0x0, l_reloc_result = 0x0,
l_versyms = 0xfe8a520, l_origin = 0x10010aa8 "/home/fsirl/.",
l_map_start = 266903552,
  l_map_end = 266971668, l_scope = {0x30026818, 0x100109e0, 0x0, 0x0},
l_local_scope = {0x100109e0, 0x0}, l_dev = 773, l_ino = 206239,
l_runpath_dirs = 0x0,
  l_initfini = 0x10010b4c, l_reldepsmax = 0, l_reldepsact = 0, l_reldeps
= 0x0, l_feature_1 = 0, l_flags_1 = 0}
(gdb) 

And now? I'm a bit lost here cause I don't know what to expect.

Franz.

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