This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Main in Lib


Hi Bharathi,

libfoo.so is a shared object library.  Shared object libraries are linked in
at runtime.  libfoo.so must be resolvable by the running program.  Shared
object libraries can be either "hard linked" as static shared objects (SSO),
or as dynamic shared objects (DSO).  A DSO uses the dlopen command to
explicitly open and refer to the resources of the shared object library.

libfoo.a is an archive library.  Archive libraries are linked in at link
time, instead of being deferred until runtime.  Linking against an archive
library makes the application larger, on disk.  Either kind of library is
about the same size in memory, although shared object libraries can
(possibly) be shared across multiple applications using the same library,
reducing overall physical memory footprints.

The 'nm' command and the 'objdump' can display information about shared
object libraries.

The 'ar' command can display information about archive libraries.

Sincerely,
--Eljay



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