Operating System - HP-UX
1837984 Members
2682 Online
110124 Solutions
New Discussion

Static library dependency detection

 
SOLVED
Go to solution
Muthukumar_5
Honored Contributor

Static library dependency detection

I have built a shared library called libtest.so which used the symbols from other static libraries like libssl.a, libdb.a, ..etc.
How to find what are static dependency libraries and dependency inforamtions are taken by shared library libtest.so ?

Note:
I can find using ldd/chatr only when I built the library libtest.so with shared dependency library. How do it for static libraries on there.

Thanks
Muthu


Easy to suggest when don't know about the problem!
2 REPLIES 2
ranganath ramachandra
Esteemed Contributor
Solution

Re: Static library dependency detection

it seems that you can only hope to find C filenames, by looking for (absolute) symbols of type FILE:

elfdump -t | grep FILE

you can also see similar info with

elfdump -dc

these are put in by the HP compilers (no idea about gcc) into each of the object files and not by the linker. you wont find this information if the library is stripped.

i dont think you can get the names of archive files. only the linker knows what all libraries were used at link time and it does not record that information for archive libraries or object files into the target.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Muthukumar_5
Honored Contributor

Re: Static library dependency detection

Thanks ramachandra.

We can get asbolute file names with elfdump (IPF) / odump ( PA-RISC ) system routies.

Thanks for your information.

Easy to suggest when don't know about the problem!