Hi All
Any PDF or website that talk about how library load the shared library? I want to know what strategy make linux remove the shared library from the memory.
thanks
from Peter ([email protected])
material about library loading
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: material about library loading
I would imagine that, for each library, it keeps a count of how many programs there are in memory which need it. Every time one such program is loaded it increments the count, and every time one such program terminates, it decrements the count. When the count gets down to zero it removes the library from memory. Unless it is being used by the OS itself of course.
The continuous image of a connected set is connected.
Re: material about library loading
how would the dynamic linking work? what I mean is, how are programs, compiled against that library, to know where the library is gonna end up being loaded?
Re: material about library loading
This site http://www.iecc.com/linker/linker10.html seems to have lots of information about ELF dynamic linking.
Re: material about library loading
thank you for the idea
from Peter
from Peter
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: material about library loading
I've only read about half of the ELF spec so far, and only the bits that would help me load an executable, but form what I remember about Dynamic Linking, the ELF file provides a path to the library it requires. I can't remember whether it provides an absolute address to the symbol/function it wants, or whether it provides simply the symbol name either.yemista wrote:how would the dynamic linking work? what I mean is, how are programs, compiled against that library, to know where the library is gonna end up being loaded?
Generally, what I picked up was that the OS resolves the symbols, etc, and points the CPU to the right function based on the Symbol Tables and DYNSYM sections.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.