This is the mail archive of the libc-help@sourceware.org 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]
Other format: [Raw text]

Re: wrong (?) order of initialization of so.


On Tue, Jan 07, 2014 at 11:16:42AM +0000, Andrea wrote:
> On 06/01/14 22:39, OndÅej BÃlka wrote:
> 
> > The ld decides order and it should be A B C D. Simplest explanation would be cyclic dependecy,
> > is there E that D depend on C and E depends on A?
> 
> I have been unable to find it so far.
> How do I detect a cyclic dependency?
> 
> If I get all the .so loaded, extract the DT_NEEDED for each and check if there is a loop, would that
> be enough?
>
If there is a loop then yes.

 
If that does not help then you can try use audit to print more
information.

http://man7.org/linux/man-pages/man7/rtld-audit.7.html

> It is possible that some .so calls dlopen() in the init phase. Would that be relevant in this context?
>
Could be, dlopens in constructors are generaly bad idea, you could try
to print backtraces with audit interface.


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