[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

RE: [LI] how to implement shared objects??



Hi
 
 That is the way it happens. As far as my understanding goes, what it
keeps in the application executable is the name of the library and the
name of the function. Runtime the system searches for the library and then
it searches for the entry point of the function. You need not do it
manually.

However you can verify this.

Instead of first creating the library and then including the .h files,
include .c files with code directly. The size of the produced executable
will be much bigger as compared to what it produced with the library
approach.

Also if you create a simple program like a text calculator, it will take
more than 20KB of executable under dos/windows. But under unix/linux the
same program produces an executable around couple of Kb because functions
like printf and scanf are dynamically linked under unix/linux. I think you
can use gdb to confirm this. Sorry I am not very familiar with gdb.

 Bye
  Shridhar
  


On Tue, 11 Jan 2000, Guruprasad, Mahendrakar  V (IE10) wrote:

> Thanks for this information.
> I feel this is kind of statistical linking of shared libraries. Is there any
> way to  dynamically link them.?For example, I don't want to keep this .so
> library in memoy unless I require it at particular point of time.
> Before I call the functions in this .so file, can I load the .so file & when
> I am done with that, can I unload this file
> from memory?
> 
> Regards
> Guruprasad

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.