Examine individual changes
Appearance
This page allows you to examine the variables generated by the Edit Filter for an individual change.
Variables generated for this change
Variable | Value |
---|---|
Edit count of the user (user_editcount ) | 173 |
Name of the user account (user_name ) | 'Stevannus rua' |
Age of the user account (user_age ) | 1895379 |
Groups (including implicit) the user is in (user_groups ) | [
0 => '*',
1 => 'user',
2 => 'autoconfirmed'
] |
Rights that the user has (user_rights ) | [
0 => 'createaccount',
1 => 'read',
2 => 'edit',
3 => 'createtalk',
4 => 'writeapi',
5 => 'viewmywatchlist',
6 => 'editmywatchlist',
7 => 'viewmyprivateinfo',
8 => 'editmyprivateinfo',
9 => 'editmyoptions',
10 => 'abusefilter-log-detail',
11 => 'urlshortener-create-url',
12 => 'centralauth-merge',
13 => 'abusefilter-view',
14 => 'abusefilter-log',
15 => 'vipsscaler-test',
16 => 'collectionsaveasuserpage',
17 => 'reupload-own',
18 => 'move-rootuserpages',
19 => 'createpage',
20 => 'minoredit',
21 => 'editmyusercss',
22 => 'editmyuserjson',
23 => 'editmyuserjs',
24 => 'purge',
25 => 'sendemail',
26 => 'applychangetags',
27 => 'spamblacklistlog',
28 => 'mwoauthmanagemygrants',
29 => 'reupload',
30 => 'upload',
31 => 'move',
32 => 'autoconfirmed',
33 => 'editsemiprotected',
34 => 'skipcaptcha',
35 => 'ipinfo',
36 => 'ipinfo-view-basic',
37 => 'transcode-reset',
38 => 'transcode-status',
39 => 'createpagemainns',
40 => 'movestable',
41 => 'autoreview'
] |
Whether the user is editing from mobile app (user_app ) | false |
Whether or not a user is editing through the mobile interface (user_mobile ) | true |
Page ID (page_id ) | 65027 |
Page namespace (page_namespace ) | 0 |
Page title without namespace (page_title ) | 'Shared library' |
Full page title (page_prefixedtitle ) | 'Shared library' |
Edit protection level of the page (page_restrictions_edit ) | [] |
Last ten users to contribute to the page (page_recent_contributors ) | [
0 => 'The Transhumanist',
1 => 'FatalError',
2 => 'Vegaswikian',
3 => 'TakuyaMurata',
4 => 'Toby Bartels'
] |
Page age in seconds (page_age ) | 662842996 |
Action (action ) | 'edit' |
Edit summary/reason (summary ) | '' |
Old content model (old_content_model ) | 'wikitext' |
New content model (new_content_model ) | 'wikitext' |
Old page wikitext, before the edit (old_wikitext ) | '#REDIRECT [[Library (computing)#Shared libraries]]
{{R to section}}' |
New page wikitext, after the edit (new_wikitext ) | '
{{redirect|Shared object|the synchronization mechanism|Monitor (synchronization)}}
A '''shared library''' or '''shared object''' is a file that is intended to be shared by [[executable files]] and further shared [[object file]]s. Modules used by a program are loaded from individual shared objects into memory at [[load time]] or [[Runtime (program lifecycle phase)|runtime]], rather than being copied by a linker when it creates a single monolithic executable file for the program.
Shared libraries can be statically linked during compile-time, meaning that references to the library modules are resolved and the modules are allocated memory when the executable file is created.{{cn|date=June 2023}} But often linking of shared libraries is postponed until they are loaded.{{Dubious|date=May 2014}}
Most modern [[operating system]]s<ref group=NB>Some older systems, e.g., [[Burroughs MCP]], [[Multics]], also have only a single format for executable files, regardless of whether they are shared.</ref> can have shared library files of the same format as the executable files. This offers two main advantages: first, it requires making only one loader for both of them, rather than two (having the single loader is considered well worth its added complexity){{Citation Needed|date=April 2022}}. Secondly, it allows the executables also to be used as shared libraries, if they have a [[symbol table]]. Typical combined executable and shared library formats are [[Executable and Linkable Format|ELF]] and [[Mach-O]] (both in Unix) and [[Portable Executable|PE]] (Windows).
In some older environments such as [[16-bit Windows]] or [[HP Multi-Programming Executive|MPE]] for the [[HP 3000]], only stack-based data (local) was allowed in shared-library code, or other significant restrictions were placed on shared-library code.
==Memory sharing==
{{main|Shared memory}}
Library code may be shared in memory by multiple [[Process (computing)|process]]es, and on disk. If virtual memory is used, processes would execute the same physical page of RAM that is mapped into the different address spaces of the processes. This has advantages. For instance, on the [[OpenStep]] system, applications were often only a few hundred kilobytes in size and loaded quickly; most of their code was located in libraries that had already been loaded for other purposes by the operating system.{{Citation needed|date=December 2008}}
Programs can accomplish RAM sharing by using [[position-independent code]], as in [[Unix]], which leads to a complex but flexible architecture, or by using common virtual addresses, as in Windows and [[OS/2]]. These systems ensure, by various means, like pre-mapping the address space and reserving slots for each shared library, that code has a high probability of being shared. A third alternative is [[single-level store]], as used by the [[IBM System/38]] and its successors. This allows position-dependent code, but places no significant restrictions on where code can be placed or how it can be shared.
In some cases, different versions of shared libraries can cause problems, especially when libraries of different versions have the same file name, and different applications installed on a system each require a specific version. Such a scenario is known as [[DLL hell]], named after the Windows and OS/2 [[DLL file]]. Most modern operating systems after 2001 have clean-up methods to eliminate such situations or use application-specific "private" libraries.<ref name="endofdllhell">{{cite web
| url=http://msdn.microsoft.com/library/techart/dlldanger1.htm
| title=The End of DLL Hell
| date=2000-01-11
| last=Anderson
| first=Rick
| publisher=microsoft.com
| archive-url=https://web.archive.org/web/20010605023737/http://msdn.microsoft.com/library/techart/dlldanger1.htm
| archive-date=2001-06-05
| access-date=2012-01-15
| quote=Private DLLs are DLLs that are installed with a specific application and used only by that application.
}}</ref>
==Dynamic linking==
{{main|Dynamic linker}}
Dynamic linking or [[late binding]] is linking performed while a program is being loaded ([[load time]]) or executed ([[Runtime (program lifecycle phase)|runtime]]), rather than when the executable file is created. A dynamically linked library ([[dynamic-link library]], or DLL, under [[Microsoft Windows|Windows]] and [[OS/2]]; shareable image under [[OpenVMS]];<ref>{{cite web|url=https://vmssoftware.com/docs/VSI_Linker_Manual.pdf|title=VSI OpenVMS Linker Utility Manual|date=August 2019|access-date=2021-01-31|publisher=VSI}}</ref> dynamic shared object, or DSO, under [[Unix-like]] systems) is a library intended for dynamic linking. Only a minimal amount of work is done by the [[Linker (computing)|linker]] when the executable file is created; it only records what library routines the program needs and the index names or numbers of the routines in the library. The majority of the work of linking is done at the time the application is loaded (load time) or during execution (runtime). Usually, the necessary linking program, called a "dynamic linker" or "linking loader", is actually part of the underlying [[operating system]]. (However, it is possible, and not exceedingly difficult, to write a program that uses dynamic linking and includes its own dynamic linker, even for an operating system that itself provides no support for dynamic linking.)
Programmers originally developed dynamic linking in the [[Multics]] operating system, starting in 1964, and the MTS ([[Michigan Terminal System]]), built in the late 1960s.<ref>{{cite journal | title=A History of MTS | journal=Information Technology Digest | volume=5 | issue=5}}</ref>
==Optimizations==
Since shared libraries on most systems do not change often, systems can compute a likely load address for each shared library on the system before it is needed and store that information in the libraries and executables. If every shared library that is loaded has undergone this process, then each will load at its predetermined address, which speeds up the process of dynamic linking. This optimization is known as [[prebinding|prebinding or prelinking]] on macOS and Linux, respectively. IBM [[z/VM]] uses a similar technique, called "Discontinuous Saved Segments" (DCSS).<ref>{{cite book |last1=IBM Corporation |title=Saved Segments Planning and Administration |date=2011 |url=http://publibfp.boulder.ibm.com/epubs/pdf/hcsg4c10.pdf |access-date=Jan 29, 2022}}</ref> Disadvantages of this technique include the time required to precompute these addresses every time the shared libraries change, the inability to use [[address space layout randomization]], and the requirement of sufficient virtual address space for use (a problem that will be alleviated by the adoption of [[64-bit]] architectures, at least for the time being).
==Locating libraries at runtime==
Loaders for shared libraries vary widely in functionality. Some depend on the executable storing explicit paths to the libraries. Any change to the library naming or layout of the file system will cause these systems to fail. More commonly, only the name of the library (and not the path) is stored in the executable, with the operating system supplying a method to find the library on disk, based on some algorithm.
If a shared library that an executable depends on is deleted, moved, or renamed, or if an incompatible version of the library is copied to a place that is earlier in the search, the executable would fail to load. This is called ''[[dependency hell]]'', existing on many platforms. The (infamous) Windows variant is commonly known as [[DLL hell]]. This problem cannot occur if each version of each library is uniquely identified and each program references libraries only by their full unique identifiers. The "DLL hell" problems with earlier Windows versions arose from using only the names of libraries, which were not guaranteed to be unique, to resolve dynamic links in programs. (To avoid "DLL hell", later versions of Windows rely largely on options for programs to install private DLLs—essentially a partial retreat from the use of shared libraries—along with mechanisms to prevent replacement of shared system DLLs with earlier versions of them.)
===Microsoft Windows===
[[Microsoft Windows]] checks the [[Windows registry|registry]] to determine the proper place to load DLLs that implement [[Component Object Model|COM objects]], but for other DLLs it will check the directories in a defined order. First, Windows checks the directory where it loaded the program (''private DLL''<ref name="endofdllhell"/>); any directories set by calling the <code>SetDllDirectory()</code> function; the System32, System, and Windows directories; then the current working directory; and finally the directories specified by the PATH [[environment variable]].<ref>{{cite web
|url = http://msdn.microsoft.com/en-us/library/ms682586.aspx
|title = Dynamic-Link Library Search Order
|work = Microsoft Developer Network Library
|publisher = Microsoft
|date = 2012-03-06
|access-date = 2012-05-20
|url-status = live
|archive-url = https://web.archive.org/web/20120509160536/http://msdn.microsoft.com/en-us/library/ms682586.aspx
|archive-date = 9 May 2012
}}</ref> Applications written for the [[.NET Framework]] (since 2002), also check the [[Global Assembly Cache]] as the primary store of shared dll files to remove the issue of [[DLL hell]].
===OpenStep===
[[OpenStep]] useda more flexible system, collecting a list of libraries from a number of known locations (similar to the PATH concept) when the system first starts. Moving libraries around causes no problems at all, although users incur a time cost when first starting the system.
===Unix-like systems===
Most [[Unix-like]] systems have a "search path" specifying file-system [[Directory (computing)|directories]] in which to look for dynamic libraries. Some systems specify the default path in a [[configuration file]], others hard-code it into the dynamic loader. Some [[executable|executable file]] formats can specify additional directories in which to search for libraries for a particular program. This can usually be overridden with an [[environment variable]], although it is disabled for [[setuid]] and setgid programs, so that a user can't force such a program to run arbitrary code with root permissions. Developers of libraries are encouraged to place their dynamic libraries in places in the default search path. On the downside, this can make installation of new libraries problematic, and these "known" locations quickly become home to an increasing number of library files, making management more complex.
==Dynamic loading==
{{Main|Dynamic loading}}
Dynamic loading, a subset of dynamic linking, involves a dynamically linked library loading and unloading at [[Runtime (program lifecycle phase)|runtime]] on request. Such a request may be made implicitly or explicitly. Implicit requests are made when a compiler or static linker adds library references that include file paths or simply file names.{{cn|date=March 2020}} Explicit requests are made when applications make direct calls to an operating system's API.
Most operating systems that support dynamically linked libraries also support dynamically loading such libraries via a [[Runtime (program lifecycle phase)|run-time]] linker [[Application programming interface|API]]. For instance, [[Microsoft Windows]] uses the API functions <code>LoadLibrary</code>, <code>LoadLibraryEx</code>, <code>FreeLibrary</code> and <code>GetProcAddress</code> with [[Microsoft Dynamic Link Library|Microsoft Dynamic Link Libraries]]; [[POSIX]]-based systems, including most UNIX and UNIX-like systems, use <code>dlopen</code>, <code>dlclose</code> and <code>dlsym</code>. Some development systems automate this process.' |
Unified diff of changes made by edit (edit_diff ) | '@@ -1,3 +1,70 @@
-#REDIRECT [[Library (computing)#Shared libraries]]
-{{R to section}}
+{{redirect|Shared object|the synchronization mechanism|Monitor (synchronization)}}
+
+A '''shared library''' or '''shared object''' is a file that is intended to be shared by [[executable files]] and further shared [[object file]]s. Modules used by a program are loaded from individual shared objects into memory at [[load time]] or [[Runtime (program lifecycle phase)|runtime]], rather than being copied by a linker when it creates a single monolithic executable file for the program.
+
+Shared libraries can be statically linked during compile-time, meaning that references to the library modules are resolved and the modules are allocated memory when the executable file is created.{{cn|date=June 2023}} But often linking of shared libraries is postponed until they are loaded.{{Dubious|date=May 2014}}
+
+Most modern [[operating system]]s<ref group=NB>Some older systems, e.g., [[Burroughs MCP]], [[Multics]], also have only a single format for executable files, regardless of whether they are shared.</ref> can have shared library files of the same format as the executable files. This offers two main advantages: first, it requires making only one loader for both of them, rather than two (having the single loader is considered well worth its added complexity){{Citation Needed|date=April 2022}}. Secondly, it allows the executables also to be used as shared libraries, if they have a [[symbol table]]. Typical combined executable and shared library formats are [[Executable and Linkable Format|ELF]] and [[Mach-O]] (both in Unix) and [[Portable Executable|PE]] (Windows).
+
+In some older environments such as [[16-bit Windows]] or [[HP Multi-Programming Executive|MPE]] for the [[HP 3000]], only stack-based data (local) was allowed in shared-library code, or other significant restrictions were placed on shared-library code.
+
+==Memory sharing==
+{{main|Shared memory}}
+
+Library code may be shared in memory by multiple [[Process (computing)|process]]es, and on disk. If virtual memory is used, processes would execute the same physical page of RAM that is mapped into the different address spaces of the processes. This has advantages. For instance, on the [[OpenStep]] system, applications were often only a few hundred kilobytes in size and loaded quickly; most of their code was located in libraries that had already been loaded for other purposes by the operating system.{{Citation needed|date=December 2008}}
+
+Programs can accomplish RAM sharing by using [[position-independent code]], as in [[Unix]], which leads to a complex but flexible architecture, or by using common virtual addresses, as in Windows and [[OS/2]]. These systems ensure, by various means, like pre-mapping the address space and reserving slots for each shared library, that code has a high probability of being shared. A third alternative is [[single-level store]], as used by the [[IBM System/38]] and its successors. This allows position-dependent code, but places no significant restrictions on where code can be placed or how it can be shared.
+
+In some cases, different versions of shared libraries can cause problems, especially when libraries of different versions have the same file name, and different applications installed on a system each require a specific version. Such a scenario is known as [[DLL hell]], named after the Windows and OS/2 [[DLL file]]. Most modern operating systems after 2001 have clean-up methods to eliminate such situations or use application-specific "private" libraries.<ref name="endofdllhell">{{cite web
+| url=http://msdn.microsoft.com/library/techart/dlldanger1.htm
+| title=The End of DLL Hell
+| date=2000-01-11
+| last=Anderson
+| first=Rick
+| publisher=microsoft.com
+| archive-url=https://web.archive.org/web/20010605023737/http://msdn.microsoft.com/library/techart/dlldanger1.htm
+| archive-date=2001-06-05
+| access-date=2012-01-15
+| quote=Private DLLs are DLLs that are installed with a specific application and used only by that application.
+}}</ref>
+
+==Dynamic linking==
+{{main|Dynamic linker}}
+
+Dynamic linking or [[late binding]] is linking performed while a program is being loaded ([[load time]]) or executed ([[Runtime (program lifecycle phase)|runtime]]), rather than when the executable file is created. A dynamically linked library ([[dynamic-link library]], or DLL, under [[Microsoft Windows|Windows]] and [[OS/2]]; shareable image under [[OpenVMS]];<ref>{{cite web|url=https://vmssoftware.com/docs/VSI_Linker_Manual.pdf|title=VSI OpenVMS Linker Utility Manual|date=August 2019|access-date=2021-01-31|publisher=VSI}}</ref> dynamic shared object, or DSO, under [[Unix-like]] systems) is a library intended for dynamic linking. Only a minimal amount of work is done by the [[Linker (computing)|linker]] when the executable file is created; it only records what library routines the program needs and the index names or numbers of the routines in the library. The majority of the work of linking is done at the time the application is loaded (load time) or during execution (runtime). Usually, the necessary linking program, called a "dynamic linker" or "linking loader", is actually part of the underlying [[operating system]]. (However, it is possible, and not exceedingly difficult, to write a program that uses dynamic linking and includes its own dynamic linker, even for an operating system that itself provides no support for dynamic linking.)
+
+Programmers originally developed dynamic linking in the [[Multics]] operating system, starting in 1964, and the MTS ([[Michigan Terminal System]]), built in the late 1960s.<ref>{{cite journal | title=A History of MTS | journal=Information Technology Digest | volume=5 | issue=5}}</ref>
+
+==Optimizations==
+Since shared libraries on most systems do not change often, systems can compute a likely load address for each shared library on the system before it is needed and store that information in the libraries and executables. If every shared library that is loaded has undergone this process, then each will load at its predetermined address, which speeds up the process of dynamic linking. This optimization is known as [[prebinding|prebinding or prelinking]] on macOS and Linux, respectively. IBM [[z/VM]] uses a similar technique, called "Discontinuous Saved Segments" (DCSS).<ref>{{cite book |last1=IBM Corporation |title=Saved Segments Planning and Administration |date=2011 |url=http://publibfp.boulder.ibm.com/epubs/pdf/hcsg4c10.pdf |access-date=Jan 29, 2022}}</ref> Disadvantages of this technique include the time required to precompute these addresses every time the shared libraries change, the inability to use [[address space layout randomization]], and the requirement of sufficient virtual address space for use (a problem that will be alleviated by the adoption of [[64-bit]] architectures, at least for the time being).
+
+==Locating libraries at runtime==
+Loaders for shared libraries vary widely in functionality. Some depend on the executable storing explicit paths to the libraries. Any change to the library naming or layout of the file system will cause these systems to fail. More commonly, only the name of the library (and not the path) is stored in the executable, with the operating system supplying a method to find the library on disk, based on some algorithm.
+
+If a shared library that an executable depends on is deleted, moved, or renamed, or if an incompatible version of the library is copied to a place that is earlier in the search, the executable would fail to load. This is called ''[[dependency hell]]'', existing on many platforms. The (infamous) Windows variant is commonly known as [[DLL hell]]. This problem cannot occur if each version of each library is uniquely identified and each program references libraries only by their full unique identifiers. The "DLL hell" problems with earlier Windows versions arose from using only the names of libraries, which were not guaranteed to be unique, to resolve dynamic links in programs. (To avoid "DLL hell", later versions of Windows rely largely on options for programs to install private DLLs—essentially a partial retreat from the use of shared libraries—along with mechanisms to prevent replacement of shared system DLLs with earlier versions of them.)
+
+===Microsoft Windows===
+[[Microsoft Windows]] checks the [[Windows registry|registry]] to determine the proper place to load DLLs that implement [[Component Object Model|COM objects]], but for other DLLs it will check the directories in a defined order. First, Windows checks the directory where it loaded the program (''private DLL''<ref name="endofdllhell"/>); any directories set by calling the <code>SetDllDirectory()</code> function; the System32, System, and Windows directories; then the current working directory; and finally the directories specified by the PATH [[environment variable]].<ref>{{cite web
+ |url = http://msdn.microsoft.com/en-us/library/ms682586.aspx
+ |title = Dynamic-Link Library Search Order
+ |work = Microsoft Developer Network Library
+ |publisher = Microsoft
+ |date = 2012-03-06
+ |access-date = 2012-05-20
+ |url-status = live
+ |archive-url = https://web.archive.org/web/20120509160536/http://msdn.microsoft.com/en-us/library/ms682586.aspx
+ |archive-date = 9 May 2012
+}}</ref> Applications written for the [[.NET Framework]] (since 2002), also check the [[Global Assembly Cache]] as the primary store of shared dll files to remove the issue of [[DLL hell]].
+
+===OpenStep===
+[[OpenStep]] useda more flexible system, collecting a list of libraries from a number of known locations (similar to the PATH concept) when the system first starts. Moving libraries around causes no problems at all, although users incur a time cost when first starting the system.
+
+===Unix-like systems===
+Most [[Unix-like]] systems have a "search path" specifying file-system [[Directory (computing)|directories]] in which to look for dynamic libraries. Some systems specify the default path in a [[configuration file]], others hard-code it into the dynamic loader. Some [[executable|executable file]] formats can specify additional directories in which to search for libraries for a particular program. This can usually be overridden with an [[environment variable]], although it is disabled for [[setuid]] and setgid programs, so that a user can't force such a program to run arbitrary code with root permissions. Developers of libraries are encouraged to place their dynamic libraries in places in the default search path. On the downside, this can make installation of new libraries problematic, and these "known" locations quickly become home to an increasing number of library files, making management more complex.
+
+==Dynamic loading==
+{{Main|Dynamic loading}}
+Dynamic loading, a subset of dynamic linking, involves a dynamically linked library loading and unloading at [[Runtime (program lifecycle phase)|runtime]] on request. Such a request may be made implicitly or explicitly. Implicit requests are made when a compiler or static linker adds library references that include file paths or simply file names.{{cn|date=March 2020}} Explicit requests are made when applications make direct calls to an operating system's API.
+
+Most operating systems that support dynamically linked libraries also support dynamically loading such libraries via a [[Runtime (program lifecycle phase)|run-time]] linker [[Application programming interface|API]]. For instance, [[Microsoft Windows]] uses the API functions <code>LoadLibrary</code>, <code>LoadLibraryEx</code>, <code>FreeLibrary</code> and <code>GetProcAddress</code> with [[Microsoft Dynamic Link Library|Microsoft Dynamic Link Libraries]]; [[POSIX]]-based systems, including most UNIX and UNIX-like systems, use <code>dlopen</code>, <code>dlclose</code> and <code>dlsym</code>. Some development systems automate this process.
' |
New page size (new_size ) | 11855 |
Old page size (old_size ) | 68 |
Size change in edit (edit_delta ) | 11787 |
Lines added in edit (added_lines ) | [
0 => '{{redirect|Shared object|the synchronization mechanism|Monitor (synchronization)}}',
1 => '',
2 => 'A '''shared library''' or '''shared object''' is a file that is intended to be shared by [[executable files]] and further shared [[object file]]s. Modules used by a program are loaded from individual shared objects into memory at [[load time]] or [[Runtime (program lifecycle phase)|runtime]], rather than being copied by a linker when it creates a single monolithic executable file for the program.',
3 => '',
4 => 'Shared libraries can be statically linked during compile-time, meaning that references to the library modules are resolved and the modules are allocated memory when the executable file is created.{{cn|date=June 2023}} But often linking of shared libraries is postponed until they are loaded.{{Dubious|date=May 2014}}',
5 => '',
6 => 'Most modern [[operating system]]s<ref group=NB>Some older systems, e.g., [[Burroughs MCP]], [[Multics]], also have only a single format for executable files, regardless of whether they are shared.</ref> can have shared library files of the same format as the executable files. This offers two main advantages: first, it requires making only one loader for both of them, rather than two (having the single loader is considered well worth its added complexity){{Citation Needed|date=April 2022}}. Secondly, it allows the executables also to be used as shared libraries, if they have a [[symbol table]]. Typical combined executable and shared library formats are [[Executable and Linkable Format|ELF]] and [[Mach-O]] (both in Unix) and [[Portable Executable|PE]] (Windows).',
7 => '',
8 => 'In some older environments such as [[16-bit Windows]] or [[HP Multi-Programming Executive|MPE]] for the [[HP 3000]], only stack-based data (local) was allowed in shared-library code, or other significant restrictions were placed on shared-library code.',
9 => '',
10 => '==Memory sharing==',
11 => '{{main|Shared memory}}',
12 => '',
13 => 'Library code may be shared in memory by multiple [[Process (computing)|process]]es, and on disk. If virtual memory is used, processes would execute the same physical page of RAM that is mapped into the different address spaces of the processes. This has advantages. For instance, on the [[OpenStep]] system, applications were often only a few hundred kilobytes in size and loaded quickly; most of their code was located in libraries that had already been loaded for other purposes by the operating system.{{Citation needed|date=December 2008}}',
14 => '',
15 => 'Programs can accomplish RAM sharing by using [[position-independent code]], as in [[Unix]], which leads to a complex but flexible architecture, or by using common virtual addresses, as in Windows and [[OS/2]]. These systems ensure, by various means, like pre-mapping the address space and reserving slots for each shared library, that code has a high probability of being shared. A third alternative is [[single-level store]], as used by the [[IBM System/38]] and its successors. This allows position-dependent code, but places no significant restrictions on where code can be placed or how it can be shared.',
16 => '',
17 => 'In some cases, different versions of shared libraries can cause problems, especially when libraries of different versions have the same file name, and different applications installed on a system each require a specific version. Such a scenario is known as [[DLL hell]], named after the Windows and OS/2 [[DLL file]]. Most modern operating systems after 2001 have clean-up methods to eliminate such situations or use application-specific "private" libraries.<ref name="endofdllhell">{{cite web',
18 => '| url=http://msdn.microsoft.com/library/techart/dlldanger1.htm',
19 => '| title=The End of DLL Hell',
20 => '| date=2000-01-11',
21 => '| last=Anderson',
22 => '| first=Rick',
23 => '| publisher=microsoft.com',
24 => '| archive-url=https://web.archive.org/web/20010605023737/http://msdn.microsoft.com/library/techart/dlldanger1.htm',
25 => '| archive-date=2001-06-05',
26 => '| access-date=2012-01-15',
27 => '| quote=Private DLLs are DLLs that are installed with a specific application and used only by that application.',
28 => '}}</ref>',
29 => '',
30 => '==Dynamic linking==',
31 => '{{main|Dynamic linker}}',
32 => '',
33 => 'Dynamic linking or [[late binding]] is linking performed while a program is being loaded ([[load time]]) or executed ([[Runtime (program lifecycle phase)|runtime]]), rather than when the executable file is created. A dynamically linked library ([[dynamic-link library]], or DLL, under [[Microsoft Windows|Windows]] and [[OS/2]]; shareable image under [[OpenVMS]];<ref>{{cite web|url=https://vmssoftware.com/docs/VSI_Linker_Manual.pdf|title=VSI OpenVMS Linker Utility Manual|date=August 2019|access-date=2021-01-31|publisher=VSI}}</ref> dynamic shared object, or DSO, under [[Unix-like]] systems) is a library intended for dynamic linking. Only a minimal amount of work is done by the [[Linker (computing)|linker]] when the executable file is created; it only records what library routines the program needs and the index names or numbers of the routines in the library. The majority of the work of linking is done at the time the application is loaded (load time) or during execution (runtime). Usually, the necessary linking program, called a "dynamic linker" or "linking loader", is actually part of the underlying [[operating system]]. (However, it is possible, and not exceedingly difficult, to write a program that uses dynamic linking and includes its own dynamic linker, even for an operating system that itself provides no support for dynamic linking.)',
34 => '',
35 => 'Programmers originally developed dynamic linking in the [[Multics]] operating system, starting in 1964, and the MTS ([[Michigan Terminal System]]), built in the late 1960s.<ref>{{cite journal | title=A History of MTS | journal=Information Technology Digest | volume=5 | issue=5}}</ref>',
36 => '',
37 => '==Optimizations==',
38 => 'Since shared libraries on most systems do not change often, systems can compute a likely load address for each shared library on the system before it is needed and store that information in the libraries and executables. If every shared library that is loaded has undergone this process, then each will load at its predetermined address, which speeds up the process of dynamic linking. This optimization is known as [[prebinding|prebinding or prelinking]] on macOS and Linux, respectively. IBM [[z/VM]] uses a similar technique, called "Discontinuous Saved Segments" (DCSS).<ref>{{cite book |last1=IBM Corporation |title=Saved Segments Planning and Administration |date=2011 |url=http://publibfp.boulder.ibm.com/epubs/pdf/hcsg4c10.pdf |access-date=Jan 29, 2022}}</ref> Disadvantages of this technique include the time required to precompute these addresses every time the shared libraries change, the inability to use [[address space layout randomization]], and the requirement of sufficient virtual address space for use (a problem that will be alleviated by the adoption of [[64-bit]] architectures, at least for the time being).',
39 => '',
40 => '==Locating libraries at runtime==',
41 => 'Loaders for shared libraries vary widely in functionality. Some depend on the executable storing explicit paths to the libraries. Any change to the library naming or layout of the file system will cause these systems to fail. More commonly, only the name of the library (and not the path) is stored in the executable, with the operating system supplying a method to find the library on disk, based on some algorithm.',
42 => '',
43 => 'If a shared library that an executable depends on is deleted, moved, or renamed, or if an incompatible version of the library is copied to a place that is earlier in the search, the executable would fail to load. This is called ''[[dependency hell]]'', existing on many platforms. The (infamous) Windows variant is commonly known as [[DLL hell]]. This problem cannot occur if each version of each library is uniquely identified and each program references libraries only by their full unique identifiers. The "DLL hell" problems with earlier Windows versions arose from using only the names of libraries, which were not guaranteed to be unique, to resolve dynamic links in programs. (To avoid "DLL hell", later versions of Windows rely largely on options for programs to install private DLLs—essentially a partial retreat from the use of shared libraries—along with mechanisms to prevent replacement of shared system DLLs with earlier versions of them.)',
44 => '',
45 => '===Microsoft Windows===',
46 => '[[Microsoft Windows]] checks the [[Windows registry|registry]] to determine the proper place to load DLLs that implement [[Component Object Model|COM objects]], but for other DLLs it will check the directories in a defined order. First, Windows checks the directory where it loaded the program (''private DLL''<ref name="endofdllhell"/>); any directories set by calling the <code>SetDllDirectory()</code> function; the System32, System, and Windows directories; then the current working directory; and finally the directories specified by the PATH [[environment variable]].<ref>{{cite web',
47 => ' |url = http://msdn.microsoft.com/en-us/library/ms682586.aspx',
48 => ' |title = Dynamic-Link Library Search Order',
49 => ' |work = Microsoft Developer Network Library',
50 => ' |publisher = Microsoft',
51 => ' |date = 2012-03-06',
52 => ' |access-date = 2012-05-20',
53 => ' |url-status = live',
54 => ' |archive-url = https://web.archive.org/web/20120509160536/http://msdn.microsoft.com/en-us/library/ms682586.aspx',
55 => ' |archive-date = 9 May 2012',
56 => '}}</ref> Applications written for the [[.NET Framework]] (since 2002), also check the [[Global Assembly Cache]] as the primary store of shared dll files to remove the issue of [[DLL hell]].',
57 => '',
58 => '===OpenStep===',
59 => '[[OpenStep]] useda more flexible system, collecting a list of libraries from a number of known locations (similar to the PATH concept) when the system first starts. Moving libraries around causes no problems at all, although users incur a time cost when first starting the system.',
60 => '',
61 => '===Unix-like systems===',
62 => 'Most [[Unix-like]] systems have a "search path" specifying file-system [[Directory (computing)|directories]] in which to look for dynamic libraries. Some systems specify the default path in a [[configuration file]], others hard-code it into the dynamic loader. Some [[executable|executable file]] formats can specify additional directories in which to search for libraries for a particular program. This can usually be overridden with an [[environment variable]], although it is disabled for [[setuid]] and setgid programs, so that a user can't force such a program to run arbitrary code with root permissions. Developers of libraries are encouraged to place their dynamic libraries in places in the default search path. On the downside, this can make installation of new libraries problematic, and these "known" locations quickly become home to an increasing number of library files, making management more complex.',
63 => '',
64 => '==Dynamic loading==',
65 => '{{Main|Dynamic loading}}',
66 => 'Dynamic loading, a subset of dynamic linking, involves a dynamically linked library loading and unloading at [[Runtime (program lifecycle phase)|runtime]] on request. Such a request may be made implicitly or explicitly. Implicit requests are made when a compiler or static linker adds library references that include file paths or simply file names.{{cn|date=March 2020}} Explicit requests are made when applications make direct calls to an operating system's API.',
67 => '',
68 => 'Most operating systems that support dynamically linked libraries also support dynamically loading such libraries via a [[Runtime (program lifecycle phase)|run-time]] linker [[Application programming interface|API]]. For instance, [[Microsoft Windows]] uses the API functions <code>LoadLibrary</code>, <code>LoadLibraryEx</code>, <code>FreeLibrary</code> and <code>GetProcAddress</code> with [[Microsoft Dynamic Link Library|Microsoft Dynamic Link Libraries]]; [[POSIX]]-based systems, including most UNIX and UNIX-like systems, use <code>dlopen</code>, <code>dlclose</code> and <code>dlsym</code>. Some development systems automate this process.'
] |
Lines removed in edit (removed_lines ) | [
0 => '#REDIRECT [[Library (computing)#Shared libraries]]',
1 => '{{R to section}}'
] |
Whether or not the change was made through a Tor exit node (tor_exit_node ) | false |
Unix timestamp of change (timestamp ) | '1690549423' |