This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
glibc and dopen'ing modules with static TLS problem, question
- From: Andrey Erschov <andrey dot erschov at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Wed, 20 Nov 2013 07:51:37 +0400
- Subject: glibc and dopen'ing modules with static TLS problem, question
- Authentication-results: sourceware.org; auth=none
Hello!
On Fedora 19 (64-bit) I'm getting error "cannot load any more object
with static TLS" while running proprietary accounting program, which
tries to load libMagickWand.so, which, in it's order, depends on
libgomp.so compiled with static TLS.
On Ubuntu 13.04 (64-bit) same program works ok.
Running program with LD_PRELOAD=libgomp.so.1 helps, but this is not so
accurate solution, as I think.
Looking into sources of glibc, i've found code responsible for this message:
elf/dl-open.c:541:
if (! RTLD_SINGLE_THREAD_P && imap->l_tls_modid > DTV_SURPLUS)
_dl_signal_error (0, "dlopen", NULL, N_("\
cannot load any more object with static TLS"));
So I have a question: shouldn't the right part of && operator be like this:
imap->l_tls_modid >= GL(dl_tls_max_dtv_idx) + DTV_SURPLUS
If no, could you help me with next steps to adress the problem?
Thank you in advance!
-- With best regards,
Andrey