Shared library

Shared library

Post by Jasmin Pat » Wed, 05 Mar 1997 04:00:00



Could someone please explain how to list the contents (i.e the files)
in a shared library?
I am trying to get the same result as with static libraries ("ar t").

I am using HP-UX with CC.

/Jazz

Opinions expressed herein are my own and may not represent those of my employer.

 
 
 

Shared library

Post by Andrew Giert » Wed, 05 Mar 1997 04:00:00


 Jasmin> Could someone please explain how to list the contents (i.e
 Jasmin> the files) in a shared library?

 Jasmin> I am trying to get the same result as with static libraries
 Jasmin> ("ar t").

In general that isn't possible.

A static library is simply a collection of separate .o files, which can be
added to, removed from etc. A *shared* library is more like an executable;
the individual .o files have been linked together, and no longer retain
their original identity.

You can see the symbols defined and referenced using nm.

--
Andrew.

 
 
 

1. Will strip(debug shared library) == nodebug shared library ?

compiling the C++ code without debug option to produce object
files(.o) and then producing the shared library with them. Say, the
size of this library is SIZE_SO_NoD.

compiling the C++ code with debug option to produce object files(.o)
and then producing the shared library with them. Then, do 'strip
library_name'. Say, the size of this library is SIZE_SO_D.

Will SIZE_SO_NoD & SIZE_SO_D be exactly/almost equal ? If yes/no, why?
Also, what exactly 'mcs -d library_name' do? Does it reduce symbols
from the shared library which was produced without debug option also?

2. Oops in 2.4.7 final

3. Help with building shared libraries with dependencies on other shared libraries

4. Any Brain Dumps!!

5. Question: Inclusion of shared libraries during linking of shared libraries

6. Status of LINUX CMU CL Port (was Re: GINA with CMU Lisp)

7. Shared library loading shared library.

8. Problems with LiLo and 1024 Cylinder again

9. Need a Shared Library Guru: beyond simple shared library question

10. When is a shared library not a shared library?

11. Compiling static libraries as shared libraries

12. Building shared library which includes static libraries

13. Can a static library be compiled into a shared library?