views:

94

answers:

1

I wish to know how the Shared library works I am asking in terms of Symbol table reference. Is it like when we include a shared library it exports the Symbol table to process then based on some pointers we execute the respective function.

What is the meaning of Shared library Strip ?

Edit :- I wish to know that how shared library works when it get loaded into the memory.\ When a function lets say Fun() get called from the application which has def in library. then how this linking happen . I hope now its clear.

+1  A: 

Programs make calls to a shared library through a Procedure Linkage Table, which is filled in by the dynamic linker/loader ld.so based on the information in the dynamic symbol table and relocation entries. On Linux this data is stored in programs and libraries in the ELF format, which you can inspect using programs like objdump and readelf.

This Linux Journal article has a basic overview. For more detailed information check out Ulrich Drepper's excellent paper How To Write Shared Libraries, and the Solaris Linker and Libraries Guide.

mark4o
Thanks it is really helpful.
Arpit