From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel.Walker@lhsl.com To: Alexandre Oliva Cc: gcc-help@gcc.gnu.org Subject: Re: -l versus dlopen() Date: Sun, 09 Sep 2001 20:23:00 -0000 Message-id: X-SW-Source: 2001-09/msg00033.html In desperate trial and error, I've tried giving dlopen() all combinations of flags: RTLD_LAZY RTLD_LAZY | RTLD_GLOBAL RTLD_NOW RTLD_NOW | RTLD_GLOBAL None of them seen to have any affect on the problem. I really suspect that the order of global constructors is changing in a way that breaks dependencies somehow. I've heard this can be a problem in C++. Any suggestion for controlling this? Thanks! Daniel Walker Alexandre Oliva To: Daniel.Walker@lhsl.com Subject: Re: -l versus dlopen() 09/09/2001 07:34 PM On Sep 7, 2001, Daniel.Walker@lhsl.com wrote: > But if I link dynamically with dlopen() Which flags do you pass to dlopen()? > the program crashes while executing a global constructor in > _do_global_ctors_aux(). Is it possible that the constructors in the library > are reorder differently depending on how the library is loaded? Yes, that's certainly possible. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me