Saturday, November 27, 2010

Analysis of dynamic library for the Linux operating system

Dynamically linked shared libraries is a GNU/Linux? one of the important aspects.

This library allows the executable file in the run-time dynamic access to external functions (by needed will introduce function) to reduce their overall memory use. This article examines the creation and use of static libraries, develop their detailed the various tools and show these libraries work. Library for similar functions packaged in a cell. Then these units can be shared by other developers, and thus have a modular programming this way — that is, to build a program from the module. Linux supports two types of libraries, each library has its own advantages and disadvantages. Static library contains a static binding at compile time to a program's functions. Dynamic library is different, it is loaded when the application is loaded, and it and the application is bound at run time. Figure 1 shows the Linux library hierarchy. Figure 1.Linux library hierarchy using shared libraries in two ways: you can run-time dynamic link library, you can dynamically load libraries and use them under the control of the program. This article on these two methods are explored. Static library is more appropriate for smaller applications, because they only need minimal function. While the need for multiple Library applications, suitable for the use of shared libraries because they reduce the application's memory (including the runtime in disk footprint and memory consumption). This is because multiple applications can simultaneously use a shared library; therefore, each time you only need to copy a database on the memory. If a static library, each running program must have a copy of the library. GNU/Linux provides two ways to handle shared libraries (each approach rooted in SunSolaris). You can dynamically add program and shared library linked and lets Linux at execution time loading library (if it is already in memory, you no longer need to load). Another approach is to use a process called dynamic load, so that you can selectively call a library function. Using dynamic loading process, the program can load a particular library (you do not have to have loaded), and then call the library to a particular function (Figure 2 shows these two methods). This is built to support a plug-in application of a common approach. I wait while the discussion in this article and demo the application programming interface (API). Figure 2; static linking and dynamic linking

No comments:

Post a Comment