Library (computing)
file In computing, a library is a collection of resources that can be used during software development to implement a computer program. Commonly, a library consists of executable code such as compiled functions and classes, or a library can be a collection of source code. A resource library may contain data such as images and text. A library can be used by multiple, independent consumers (programs and other libraries). This differs from resources defined in a program which can usually only be used by that program. When a consumer uses a library resource, it gains the value of the library without having to implement it itself. Libraries encourage software reuse in a modular fashion. Libraries can use other libraries resulting in a hierarchy of libraries in a program. When writing code that uses a library, a programmer only needs to know how to use that library's application programming interface (API) without understanding its internal mechanics. For example, a program could use a...
file In computing, a library is a collection of resources that can be used during software development to implement a computer program. Commonly, a library consists of executable code such as compiled functions and classes, or a library can be a collection of source code. A resource library may contain data such as images and text. A library can be used by multiple, independent consumers (programs and other libraries). This differs from resources defined in a program which can usually only be used by that program. When a consumer uses a library resource, it gains the value of the library without having to implement it itself. Libraries encourage software reuse in a modular fashion. Libraries can use other libraries resulting in a hierarchy of libraries in a program. When writing code that uses a library, a programmer only needs to know how to use that library's application programming interface (API) without understanding its internal mechanics. For example, a program could use a library that abstracts a complicated system call so that the programmer can use the system feature without spending time to learn the intricacies of the system function. ==Linking== The linking (or binding) process resolves references known as symbols (or links) by searching for them in various locations including configured libraries. If a linker (or binder) does not find a symbol, then it fails, but multiple matches may or may not cause failure. Static linking is linking at build time, such that the library executable code is included in the program. Dynamic linking is linking at run time; it involves building the program with information that supports run-time linking to a dynamic link library (DLL). For dynamic linking, a compatible DLL file must be available to the program at run time, but for static linking, the program is standalone. Smart linking is performed by a build tool that excludes unused code in the linking process. For example, a program that only uses integers for arithmetic, or does no arithmetic operations at all, can exclude floating-point library routines. This can lead to smaller program file size and reduced memory usage. ==Relocation== Some references in a program or library module are stored in a relative or symbolic form which cannot be resolved until all code and libraries are assigned final static addresses. Relocation is the process of adjusting these references, and is done either by the linker or the loader. In general, relocation cannot be done to individual libraries themselves because the addresses in memory may vary depending on the program using them and other libraries they are combined with. Position-independent code avoids references to absolute addresses and therefore does not require relocation. ==File naming== ===Unix-like=== On most modern Unix-like systems, library files are stored in directories such as /lib , /usr/lib and /usr/local/lib . A filename typically starts with lib , and ends with .a for a static library (archive) or .so for a shared object (dynamically linked library). For example, libfoo.a and libfoo.so . Often, symbolic link files are used to manage versioning of a library by providing a link file named without a version that links to a file named with a version. For example, libfoo.so.2 might be version 2 of library foo and a link file named libfoo.so provides a version independent name to that file that programs link to. The link file could be changed to a refer to a version 3 ( libfoo.so.3 ) such that consuming programs will then use version 3 without having to change the program. Files with the extension .la are libtool archives; they are not usable by the system. ===macOS=== The macOS system inherits static library conventions from BSD, with the library stored in a .a file. It uses either .so or .dylib for dynamic libraries. Most libraries in macOS, however, consist of "frameworks", placed inside special directories called "bundles" which wrap the library's required files and metadata. For example, a framework called Abc would be implemented in a bundle called Abc.framework , with Abc.framework/Abc being either the dynamically linked library file or a symlink to the dynamically linked library file in Abc.framework/Versions/Current/Abc . ===Windows=== Often, a Windows dynamic-link library (DLL) has the file extension .dll , although sometimes different extensions are used to indicate general content, e.g. .ocx for a OLE library. A .lib file can be either a static library or contain the information needed to build an application that consumes the associated DLL. In the latter case, the associated DLL file must be present at runtime. ==See also== (VCL) (CLX) (used by the C++ Standard Library) List of open source code libraries ==Notes== ==References== ==Further reading== Code: [ftp://ftp.iecc.com/pub/linker/] Errata: Article Beginner's Guide to Linkers by David Drysdale Article Faster C++ program startups by improving runtime linking efficiency by Léon Bottou and John Ryland by Baris Simsek BFD - the Binary File Descriptor Library 1st Library-Centric Software Design Workshop LCSD'05 at OOPSLA'05 2nd Library-Centric Software Design Workshop LCSD'06 at OOPSLA'06 How to create shared library by Ulrich Drepper (with much background info) Anatomy of Linux dynamic libraries at IBM.com
References
- ^ Babbage, H. P. (1888-09-12). "The Analytical Engine" . Proceedings of the British Association . Bath. Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Deshpande, Prasad (2013). Metamorphic Detection Using Function Call Graph Analysis (Thesis). San Jose State University Library. doi : 10.31979/etd.t9xm-ahsc . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Kaminsky, Dan (2008). "Chapter 3 - Portable Executable and Executable and Linking Formats" . Reverse Engineering Code with IDA Pro . Elsevier. pp. 37– 66. doi : 10.1016/b978-1-59749-237-9.00003-x . ISBN 978-1-59749-237-9 . Retrieved 2021-05-27 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1622070000.0
- ^ Collberg, Christian; Hartman, John H.; Babu, Sridivya; Udupa, Sharath K. (2003). SLINKY: Static Linking Reloaded . USENIX '05. Department of Computer Science, University of Arizona . Archived from the original on 2016-03-23 . Retrieved 2016-03-17 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1458169200.0
- ^ Levine, John R. (2000). "9. Shared Libraries". Linkers and Loaders . ISBN 1-55860-496-0 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ UNIX System V/386 Release 3.2 Programmers Guide, Vol. 1 (PDF) . Prentice Hall. 1989. p. 8-2. ISBN 0-13-944877-2 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ "Shared Libraries in SunOS" (PDF) . pp. 1, 3. Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Goldstine, Herman H. (2008-12-31). The Computer from Pascal to von Neumann . Princeton: Princeton University Press. doi : 10.1515/9781400820139 . ISBN 978-1-4008-2013-9 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Dietrich, Jens; Pearce, David; Stringer, Jacob; Tahir, Amjed; Blincoe, Kelly (2019). "Dependency Versioning in the Wild". 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR) . pp. 349– 359. Bibcode : 2019msr..conf...67D . doi : 10.1109/MSR.2019.00061 . ISBN 978-1-7281-3412-3 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ "Code Generation Library" . Source Forge . Archived from the original on 2010-01-12 . Retrieved 2010-03-03 . Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access. Wikipedia revision 1365619090, retrieved 2026-11-21 · 1267570800.0
- ^ Bresnahan, Christine; Blum, Richard (2015-04-27). LPIC-1 Linux Professional Institute Certification Study Guide: Exam 101-400 and Exam 102-400 . John Wiley & Sons. p. 82. ISBN 9781119021186 . Archived from the original on 2015-09-24 . Retrieved 2015-09-03 . Linux shared libraries are similar to the dynamic link libraries (DLLs) of Windows. Windows DLLs are usually identified by .dll filename extensions. {{ cite book }} : More than one of |publication-date= and |date= specified ( help ) Wikipedia revision 1365619090, retrieved 2026-11-21 · 1441234800.0
- ^ Goldstine, Herman ; von Neumann, John (1947). Planning and coding of problems for an electronic computing instrument (Report). Institute for Advanced Study. pp. 3, 21– 22. OCLC 26239859 . it will probably be very important to develop an extensive "library" of subroutines Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wilkes, M. V. (1951). "The EDSAC Computer" . 1951 International Workshop on Managing Requirements Knowledge . 1951 International Workshop on Managing Requirements Knowledge. IEEE. p. 79. doi : 10.1109/afips.1951.13 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Campbell-Kelly, Martin (September 2011). "In Praise of 'Wilkes, Wheeler, and Gill' " . Communications of the ACM . 54 (9): 25– 27. doi : 10.1145/1995376.1995386 . S2CID 20261972 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wilkes, Maurice ; Wheeler, David ; Gill, Stanley (1951). The Preparation of Programs for an Electronic Digital Computer . Addison-Wesley. pp. 45, 80– 91, 100. OCLC 641145988 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ It was possible earlier between, e.g., Ada subprograms. Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ "Static Libraries" . TLDP. Archived from the original on 2013-07-03 . Retrieved 2013-10-03 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1380754800.0
- ^ Wexelblat, Richard (1981). History of Programming Languages . ACM Monograph Series. New York, NY: Academic Press (A subsidiary of Harcourt Brace ). p. 274 . ISBN 0-12-745040-8 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wexelblat, op. cit. , p. 258 Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wexelblat, op. cit. , p. 716 Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wilson, Leslie B.; Clark, Robert G. (1988). Comparative Programming Languages . Wokingham, England: Addison-Wesley. p. 126. ISBN 0-201-18483-4 . Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- ^ Wilson and Clark, op. cit. , p. 52 Wikipedia revision 1365619090, retrieved 2026-11-21 · 1795215600.0
- Babbage, H. P. The Analytical En . September 12, 1888. · 1784761200.0
- UNIX System V/386 Release 3.2 Programmers Guide, Vol. 1 . · 1784761200.0
- Shared Libraries in SunOS . · 1784761200.0
- Code Generation Library . Source Forge . retrieved 2010-03-03 · 1267570800.0
- Bresnahan, Christine. LPIC-1 Linux Professional Institute Certification Study Guide: Exam 101-400 and Exam 102-400 . · 1784761200.0
- The Computer from Pascal to von Neumann . · 1784761200.0
- 1951 International Workshop on Managing Requirements Knowledge . · 1784761200.0
- Campbell-Kelly, Martin. In Praise of 'Wilkes, Wheeler, and Gill' . September 2011. · 1784761200.0
- Wilkes, Maurice. archive.org . · 1784761200.0
- History of Programming Languages . · 1784761200.0
- Static Libraries . TLDP . retrieved 3 October 2013 · 1784761200.0
- Kaminsky, Dan. Reverse . 2008. · 1784761200.0
- SLINKY: Static Linking Reloaded . · 1784761200.0
Cite this
"Library (computing)". 1784806461. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1365619090