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 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?

It is possible that some .so calls dlopen() in the init phase. Would that be relevant in this context?


> If not then you could try reproduce layout by compiling dummy libraries
> with same layout like
> 
> gcc dummy.c -L. -lC -lD -fPIC -shared -o libB.so
> 

I have tried, but I cannot reproduce it at all in a simplified context.

Andrea


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