Loading all shared object files takes a long time
-
Hi all,
My application uses several shared object files and I notice that loading all the SO's takes quite some time (8 seconds on ARM embedded platform).
I use LD_DEBUG=files command:
@
LD_DEBUG=files myapp
@I see that it is loading the SO's, example of loading ldap:
@
2628: file=libresolv.so.2 [0]; needed by /usr/lib/libldap-2.4.so.2 [0]
2628: file=libresolv.so.2 [0]; generating link map
2628: dynamic: 0x423cdf00 base: 0x423b6000 size: 0x0001a82c
2628: entry: 0x423b809c phdr: 0x423b6034 phnum: 9
@After loading all SO's it's calling the init:
@
2628: calling init: /lib/libpthread.so.0
@I notice that loading the SO's and calling the init is going fast but that LD_DEBUG is waiting for a couple of seconds between these two actions:
@
2628: file=libresolv.so.2 [0]; needed by /usr/lib/libldap-2.4.so.2 [0]
2628: file=libresolv.so.2 [0]; generating link map
2628: dynamic: 0x423cdf00 base: 0x423b6000 size: 0x0001a82c
2628: entry: 0x423b809c phdr: 0x423b6034 phnum: 9
2628:
2628: >>>>>>>>>>>>>> WAITING .......................... <<<<<<<<<<<<<
2628: calling init: /lib/libpthread.so.0
@What is going on here? How can i further debug this?
When I use LD_DEBUG=all I get too much information...