Article Title: Linux operating system dynamic library analysis. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Is the shared library with Dynamic Links GNU/Linux? . This library allows executable files to dynamically access external functions at runtime, so as to reduce their overall memory usage (by introducing functions only when needed. This article studies the process of creating and using static databases, describes in detail the various tools for developing them, and reveals how these libraries work.
Library is used to package similar functions in a unit. These units can then be shared by other developers, and therefore have the idea of Modular programming-that is, building a program from a module. Linux supports two types of libraries, each of which has its own advantages and disadvantages. Static libraries include functions statically bound to a program during compilation. The dynamic library is different. It is loaded when the application is loaded, and it is bound to the application at runtime. Figure 1 shows the hierarchy of libraries in Linux.
Figure 1. Library hierarchy in Linux
There are two ways to use the Shared Library: You can dynamically link the library at runtime, you can also dynamically load the library and use them under program control. This article discusses both methods.
Static libraries are more suitable for small applications because they only require minimal functions. For applications that require multiple databases, shared libraries are suitable because they can reduce the memory usage (including disk usage and memory usage) of applications. This is because multiple applications can use a shared library at the same time. Therefore, you only need to copy one library in the memory at a time. For a static library, each running program must have a copy of the database.
GNU/Linux provides two methods to process shared libraries (each method is derived from Sun Solaris ). You can dynamically link the program to the shared library and let Linux load the library during execution (if it is already in memory, it does not need to be loaded ). Another method is to use a process called dynamic loading, so that the program can selectively call functions in the library. With the dynamic loading process, the program can first load a specific Library (not required if it has been loaded), and then call a specific function in the Library (Figure 2 shows the two methods ). This is a common method for building plug-ins-enabled applications. I will discuss and demonstrate this application programming interface (API) later in this article ).
Figure 2. Static and Dynamic Links
[1] [2] [3] [4] [5] Next page