首页 > 代码库 > Shared libraries
Shared libraries
Computer Systems A Programmer‘s Perspective Second Edition
Shared libraries
are modern innovations that address the disadvantages of
static libraries. A shared library is an object module that,
at run time
, can be
loaded at an arbitrary memory address and linked with a program in memory.
This process is known as
dynamic linking
and is performed by a program called a
dynamic linker
.
Shared libraries are also referred to as
shared objects
, and on Unix systems
are typically denoted by the
.so
suffix. Microsoft operating systems make heavy
use of shared libraries, which they refer to as DLLs (dynamic link libraries).
Shared libraries are “shared” in two different ways. First, in any given file
system, there is exactly one
.so
file for a particular library. The code and data in
this
.so
file are shared by all of the executable object files that reference the library,
as opposed to the contents of static libraries, which are copied and embedded in
the executables that reference them. Second, a single copy of the
.text
section of
a shared library in memory can be shared by different running processes. We will
explore this in more detail when we study virtual memory in Chapter 9.
Shared libraries
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。