- Hands-On System Programming with C++
- Dr. Rian Quinn
- 182字
- 2021-07-02 14:42:32
Dynamic libraries
Dynamic libraries are libraries that are linked at load time. Dynamic libraries are more like executables without an entry point. They contain code needed by your program, and the load-time linker is responsible for providing the location of each required function to your program while your program is being loaded.
It is also possible for your program to link itself while it executes during runtime as an optimization, only linking functions that are needed (a process known as lazy loading).
Most of the libraries provided by the operating system are dynamic libraries. To see which dynamic libraries are needed by your program, you can use the LDD tool, as follows:
> ldd a.out
linux-vdso.so.1 (0x00007ffdc5bfd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92878a0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9287e93000)
In this example, we used the LDD tool to list the dynamic libraries needed by our simple Hello World\n example. As shown, the following libraries are needed:
- vdso: a library provided by the operating system to speed up the process of making system calls
- libc: the standard C library
- ld-linux-x86-64: the dynamic linker itself, responsible for lazy-loading
- DB29forLinux,UNIX,Windows數(shù)據(jù)庫管理認(rèn)證指南
- MySQL從入門到精通(第3版)
- 大數(shù)據(jù):規(guī)劃、實施、運(yùn)維
- Neural Network Programming with TensorFlow
- Spark大數(shù)據(jù)編程實用教程
- 企業(yè)級數(shù)據(jù)與AI項目成功之道
- 大數(shù)據(jù)數(shù)學(xué)基礎(chǔ)(Python語言描述)
- 數(shù)據(jù)分析思維:產(chǎn)品經(jīng)理的成長筆記
- Arquillian Testing Guide
- Machine Learning for Mobile
- 數(shù)據(jù)分析實踐:專業(yè)知識和職場技巧
- 數(shù)據(jù)庫高效優(yōu)化:架構(gòu)、規(guī)范與SQL技巧
- 達(dá)夢數(shù)據(jù)庫集群
- TypeScript Microservices
- 大數(shù)據(jù)架構(gòu)師指南