This is the
talk page for discussing improvements to the
Library (computing) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This
level-5 vital article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
This article is a mix of high-level gloss and a sampling of nitty-gritty details. It talks little about traditional libraries (I just added a couple of sentences at the top). Partially as a result, it has some inaccuracies and potential for people to misunderstand the things that are accurate. I think it needs a rework into a structure something like this:
I like your work so you have my encouragement to proceed. Daniel.Cardenas 13:39, 17 July 2006 (UTC)
Indeed - can't someone put this more into layman's terms? For most of the readers, this is gobbledygook.-- 173.69.135.105 ( talk) 00:52, 26 October 2011 (UTC)
There is an example in this article, but no description of the example at all and this is confusing. — Preceding unsigned comment added by Gachen ( talk • contribs) 13:44, 24 June 2012 (UTC)
I agree with the "clarification needed" marking on the first sentence. While it is highly general, I think it be rather opaque to most readers. I would suggest something not as general, but much more concrete:
In computer science, a library is a set of routines that are made available for use in multiple programs.
(Though I'm much more doubtful that editors would want to include text such the following) this may also be helpful:
The term arose by analogy to a traditional library that loans books to many patrons. In a traditional library, when one patron has finished using a book, they return it, and it can be used by another patron. (Of course, for a library of computer routines, there is generally no need for programs to wait their turn. Any number of programs could have simultaneously pulled out a copy of the routine for their use, and they do not need to "check the routine back in" when they have finished with it. Editing and altering a routine is a different matter. For that activity, one would generally need to control access.)
[1] refers to a "card library", which was actually used in the early days very much as a traditional library would be used.
MarkGoldfain ( talk) 23:32, 12 July 2013 (UTC)
References
I moved this from the article, since it really belogs here:
—
Frecklefoot 18:36, 18 Sep 2003 (UTC)
Gtfjbl ( talk) 02:00, 15 April 2009 (UTC)
I merged many library-related articles to here. The article looks too long but there is a lot of overlaps. The article can be compact. -- Taku 00:36, 22 Sep 2003 (UTC)
Hmm while checking "what links here" from metaprogramming I came across this talk. Would someone care to add information on what a metaprogramming protocol might be? -- Anon
Are static linking and dynamic linking supposed to be subtopics of library linking? If so the hierarchy is all skew. -- BozMo |talk 15:17, 16 Aug 2004 (UTC)
I think that the topic .Net Assemblies could also be mentioned here. Maybe I'am wrong but arent these the replacement for ActiveX Dll collections? Please discuss this here. tobias
"Dynamic linking systems place the majority of the linker code in the underlying operating system, in which case it is known as a loader."
What does "it" refer to in the sentence above?
In the section about Dynamic Linking you say:
Unix-based systems use a PATH variable of "places to look", which tends to be robust as the PATH rarely changes.
It sounds like you are reffering to the shell PATH variable. As far as I'm aware, none of the common UNIX variants uses the PATH environment variable to lookup shared objects (aka Dynamic Libraries). Instead there are: 1. Pre-defined, system-wide paths configured in files (e.g. /etc/ld.so.conf on Linux. See ldconfig(8) for more) 2. Possibly other environment variables to override/add to the directories in (1) (e.g. LD_LIBRARY_PATH, LD_PRELOAD and others on Linux).
The only resemblance to PATH in the above is that the environment variables, if defined, are usually in the format of the standard PATH variable used by the bourne-shell to lookup programs (i.e. directory names separated by commas).
I remember seeing somewere a list of the variations on this theme (of LD_LIBRARY_PATH equivalents on "exotiq" systems like HPUX and AIX) but can't find it right now, maybe a good place to begin digging is GNU libtool).
I'm adding this here because I'm not sure how to edit the article itself.
Thanks. Penedo 02:35, 28 Apr 2005 (UTC)
On
Linux, the environment variable LD_LIBRARY_PATH
, and not PATH
, affects the search for dynamic libraries
[1]. On
Mac OS X, the environment variables DYLD_LIBRARY_PATH
and DYLD_FALLBACK_LIBRARY_PATH
affect how the dynamic loader searches for libraries. Altering DYLD_LIBRARY_PATH
can break the system, as it can allow libraries in the new search path to overshadow system libraries; altering DYLD_FALLBACK_LIBRARY_PATH
, on the other hand, allows the dynamic loader to find libraries without negatively impacting the system
[2]. ←
Michael Safyan (
talk) 09:33, 13 January 2008 (UTC)
LD_LIBRARY_PATH
originally came from
SunOS 4.0's dynamic linking mechanism; that mechanism, complete with LD_LIBRARY_PATH
, was passed on to
System V Release 4 and thus to
Solaris. Linux,
FreeBSD and
NetBSD also inherited it from those sources when they re-implemented the SunOS 4.0 and/or SVR4 shared library mechanisms, and it passed on to
OpenBSD and
DragonFly BSD from the BSDs from which they forked.
Guy Harris (
talk) 19:20, 13 January 2008 (UTC)This article is nice. I want to put it in the Project's hierarchy up toward the top. We need more participants so I'm going to keep spamming discussion pages on articles like this one till we get some momentum going. Please JOIN Today!:
This article should probably be trimed down to the history of libraries in computer science in general and an introduction to specific types of computer libraries. Information about specific types of computer libraries and implemenations of libaries on specific platforms should probably be seperated out into other pages. For example, information about static libraries, shared libraries, and dynamic libraries should be merged into their respective articles. Information about Microsoft's Dynamic Link Libraries should be merged into the respective article. Jsmethers 02:40, 6 December 2005 (UTC)
The Day oF The Future Library has Yet To Come And Will Be Phenomenal the world over will want to read The Book in there. The World will transcend into the navigational prose of the preceded cosmological particulariousness Of Scorpions who effectively lead the transition from the sublime into the eschatologically glorious, right, UTownBB Peninsularic Homonoidisticalised of The Tall Back? I like Libraries. [(7xgooglecompressormoroomon.ra) 4.59am 1.3.4450.2 13th cycle of the 1st transition in the 3wax over the second millenium installer v1.0000324 internetExecPilatefHL] — Preceding unsigned comment added by 94.173.143.47 ( talk) 23:34, 5 November 2021 (UTC)
At the bottom of the "Dynamic Linking" section: "OpenStep used a more flexible system, collecting up a list of libraries from a number of kno or if an incompatible version of the DLL is copied to a place that is earlier in the search, the executable could malfunction or even fail to load. On Windows this is commonly known as DLL hell." It seems that the text after the letters "kno" has been removed. BTW -- excellent article Jsminch 07:04, 16 December 2005 (UTC)
Thanks for the fix. Jsminch 08:28, 20 January 2006 (UTC)
Remote procedure calls already handled these tasks, but there was no standard RPC system.
On another wiki page, there was once a "drawbacks" section. It has been removed instead of being moved, saying there was no evidence! IMHO this has been done by somebody who likes dynamic libs too much : there is no real need for evidence since it is "by-design", it only needs citations and sources. Anyway, here is a link : http://en.wikipedia.org/?title=Linker&oldid=38884120#Criticism I'd like somebody with more knowledges than me to correctly add this to the Library page. I'll wait until next and do it myself if needed. Thanks. —The preceding unsigned comment was added by Camarade Tux ( talk • contribs) 01:25, 6 July 2006 (UTC).
Library (computer science) → Library (computing) – This is not an academic topic, so a more general name is appropriate. – Smyth\ talk 20:39, 25 September 2006 (UTC)
Add "* Support" or "* Oppose" followed by an optional one-sentence explanation, then sign your opinion with ~~~~
Add any additional comments
This article has been renamed as the result of a move request. Vegaswikian 19:29, 2 October 2006 (UTC)
The current section on Relocation reads as follows (italics are mine):
That last statement seems absurd to me. There would be have to be some regulatory system established to ensure that "[every version of] every library ever written" used a unique memory address range, such that there was no overlap. And when you add in my comment ("every version of") it readily becomes apparent that exhaustion of the (constantly-shrinking available portion of the) 64-bit address space wouldn't take that long. Not to mention that the overhead of having the operating system perform a virtual <==> physical address mapping for every operation of every library call would probably nullify any benefit such a system would provide. I think the statement was just a whimsical addition, and unless it can be grounded by some reputable citations, I think it should be removed.— Kbolino 04:35, 20 March 2007 (UTC)
A "standard library" is no library, but a set of requirements a library must adhere to. IOW it's more analogous to POSIX being a set of OS requirements than POSIX being an OS. 88.159.74.100 09:08, 9 July 2007 (UTC)
The link: Shared Libraries - 'Linkers and Loaders' by John R. Levine ( http://www.iecc.com/linker/linker09.html) does not seem to be working. It would be interesting to find a replacement. I'm not able to propose anything else because I don't know the exact content of the article, sorry. Seriousch 09:19, 19 August 2007 (UTC)
Why are libraries called libraries? Who invented them? When did they first appear? When were they first standardised?
Alksentrs ( talk) 01:04, 25 November 2007 (UTC)
Enderz Game ( talk) 20:48, 9 May 2011 (UTC)
I'm pretty sure the inventor of the computer program sub-routine library was a guy named John Wheeler. He was part of the team at the Cambridge Mathematical Laboratory that developed the EDVAC computer in the late 1940's. He co-wrote a book called, "Programs for an electronic digital computer" that was published in 1951 containing a detailed description of the process that they developed for "linking and loading" multiple sub-routines into a single executable program. The caption below one of the pictures at the beginning of the book reads, "The library of tapes on which subroutines are punched is contained in the steel cabinet shown on the left. The operator is punching a program tape on a keyboard perforator. She can copy mechanically tapes taken from the library on to the tape she is preparing by placing them in the tapereader shown in the center of the photograph." He's credited as the inventer of the sub-routine (a "Wheeler Jump" was slang for a sub-routine call) and the team at Cambridge seems to have focused on standardizing the process used to prepare programs for a shared library and defining the conventions as part of deliberated strategy for their re-use.
Article sez:
OpenStep used a 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 there is a time cost when first starting the system.
So this is "more flexible" than what? Presumably "everything else", I guess...:-)
"causes no problems at all" feels just a wee bit glib as well. It's been a long time since I touched Nextstep/OpenStep, so I can't remember exactly what problem this is solving, and why, if the list is only collected at boot time, this means moving libraries around would not cause a problem. Does the kernel detect library or parent directory mv
s and automatically update its link path? Does it track libraries by inode or equivalent? How about installing new libraries? Or is what this really is doing is hashing library locations for faster runtime loading? Can individual programs override this if they choose? I'm not feeling the "flexible" here from the information provided.--
NapoliRoma (
talk) 21:54, 1 January 2008 (UTC)
{{Merge|library (computer science)|date=November 2009}}
This edit undid a considerable amount of copyediting, along with making the article less future-proof by giving specific examples of Unix-like OSes instead of generalising the issue to all modern instances. It should be reverted. Chris Cunningham (not at work) - talk 18:09, 2 March 2009 (UTC)
Nowhere on this page, the concept of Incremental Linking is described. I would like to know what that concept is, but could not find it. —Preceding unsigned comment added by 209.139.213.73 ( talk) 22:20, 1 April 2009 (UTC)
I guess what is meant in the last sentence is dynamic loading. As dynamically linked libraries can imho also be pure program-startup-time-type libraries (vs. program-runtime-type libraries), the given sentence may even be wrong. -- Abdull ( talk) 11:15, 3 March 2010 (UTC)
The Multics system, where dynamic linking was invented, was able to dynamically link to segments that were not in a library at all. While there was a Binder, its use was optional; it allowed you to bundle related segments for reasons of configuration management or efficiency. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 20:13, 12 July 2010 (UTC)
Prior to the advent of personal computers and Unix, there were two prominent systems that provided dynamic linking. Due to differences in hardware architecture, the systems differed in when recursive linking took place.
The hardware for Multics supported indirect addressing and there was a tag field as part of the indirect address; some values of the tag cuased a fault (interrupt). The linkage information for an unresolved segment reference included the name of the segment, so that when a call caused a trap the dynamic linker could locate the proper segment, assign it a segment number, load it and place its entry address in the indirect address word.
The hardware for the IBM 360/67 did not have an equivalent mechanism. As a result, the designers of TSS/360 had to use a different strategy. Whenever the operating system loaded a load module, it assigned virtual storage for all subroutines called by that module, and marked the pages as assigned but invalid. A call to one of those subroutines would cause a program check interrupt, and the operating system would load the page as described above, possibly assigning storage for additional subroutines in the process.
The article should reflect the distinction between these two strategies and indicate which system uses which strategy. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 20:33, 12 July 2010 (UTC)
I wouldn't consider a system call that starts another process to be dynamic linking.Who indicated that it was? I didn't. I mentioned the image activation process as the way the run-time linker gets started; what's relevant in my description is the run-time linker, which is what handles dynamically-linked libraries.
default_error_handler_
) calling the command interpreter (see subsection 7.3.2.1).linkage_error
condition is signaled.What is the mechanism in *ix for a program to dynamically call a subroutine *in the same process*?Call it, given a character-string value, in your programming language, containing the name for the subroutine? For that, it would be dynamic loading; the same is the case on Windows. Or call it in the regular fashion in your programming language, but from a dynamically-linked library? For that, it would be the mechanism I described. Guy Harris ( talk) 21:40, 26 February 2021 (UTC)
A normal call doesn't involve passing the name of the subroutine.I.e., by "dynamically call a subroutine in the same process", you mean "call it in the regular fashion in your programming language, but from a dynamically-linked library", in which case, as I said, I've already described how that happens.
off the top of my head, could a program be linked to dynamically link to x and then change the appropriate control blocks during execution to change x to whatever?Are you talking about "in OS/360 and its successors" (given the term "control blocks"), or are you talking about "in UN*Xes and Windows"? For the latter, who's doing the change? If you mean the program itself, at least in UN*Xes, the program's
main()
function isn't called until after the shared libraries are mapped in, so it can't change that; if it could find the function names pointed to by the PLT entries, it could conceivably change the names of the functions to be called before they're called.
Guy Harris (
talk) 21:40, 26 February 2021 (UTC)
Notes
Imagine there is a shared library with a static variable. This static variable is used by one or more subroutines within this shared library. Now imagine, two or more programs use this shared library. How will these programs handle the static variable? Will these programs share it and mess with each other program's state? Or will every program make its own local copy of the variable? Thanks, -- Abdull ( talk) 22:47, 12 August 2010 (UTC)
Historically, libraries have been used to store a wide variety of objects, e.g., documentation, source code, test data. This is still common on, e.g., IBM mainframes. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 19:31, 16 August 2010 (UTC)
Sorry, but I think that an unsourced statement about how this term was used in IBM OS/360 should not trump modern and more widespread usage for the opening paragraph. The OED defines a library as "an organized collection of routines." Computer pioneers Goldstine & von Neumann (1947) and Wilkes & Wheeler (1951) also use it to mean a collection of routines. A collection of routines, functions or methods is still the modern usage. I don't see much support for the idea that libraries include documentation or data. Jno.skinner ( talk) 04:23, 26 February 2021 (UTC)
“A fundamental flaw of Microsoft Windows is that it can only link in a library at loadtime, before the process starts executing; others can wait until after the process has started to execute and link in the library just when it is actually referenced (i.e., at runtime).”
Microsoft added delayed loading of statically linked libraries in VC++ 6.0 [3]; (which is more than 10 years ago) note that this was an addition to VC++ and not to the windows kernel, which indicates that this "fundamental flaw" probably has never existed, and is speculation at best.
If Microsoft Windows did in fact not support linking a library at runtime, I'd like to see a reference or citation. 84.48.103.151 ( talk) 17:45, 20 December 2010 (UTC)
The result of the move request was: not moved, per lack of consensus — Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • ( yo?); March 17, 2011; 17:06 (UTC) 17:06, 17 March 2011 (UTC)
Library (computing) → Software library — Avoid parenthetical disambiguation with a natural and recognizable term. -- Pnm ( talk) 01:27, 13 February 2011 (UTC)
The static library article discusses libraries that, when linked with a program, have modules from the library copied into the executable image of the program. The "static libraries" section mostly discusses that process.
There were, in System V Release 3, a form of shared library that, as I remember, was not as dynamic as the SunOS 4.0 shared library mechanism from which the System V Release 4 shared library mechanism, as used by SVR4 derivatives such as Solaris as well as Linux distributions and BSD systems that adopted the ELF executable image format. I think Linux had a shared-library mechanism before the adoption of the SVR4 shared library mechanism; I don't know how dynamic it was.
My memories of this, from when I was at Sun and Sun and AT&T were engaged in the discussions that led to SVR4, are a bit faded; I can try digging up information about the SVR3 shared library mechanism, but if anybody's memories are better than mine, if they could contribute, that might be nice. Guy Harris ( talk) 21:00, 23 August 2011 (UTC)
Recently, the "shared libraries" section was changed to say "Static libraries are usually only shared at compile time" rather than "Static libraries, by definition, cannot be shared". I'm assuming "compile time" here means, on most platforms, "link time", i.e. the time at which one or more object modules built as part of a program, and object modules from a static library, are combined into an executable image.
The "shared libraries" section speaks of two different types of sharing:
The sharing in "Static libraries are usually only shared at compile time" is presumably referring to the first of those types of sharing; it's unlikely that the OS will be able to arrange that separate copies of a given routine in multiple executable images be stored in the same physical page of RAM. That code could be described as "shared", in the first sense, in that multiple programs built with the same library don't need to build their own copies of that code, so that the build processes for those programs read the routines from a single copy on disk in the library file, but the executable image files for those programs have their own separate copies of the routines on disk, rather than referring to a shared copy in the static library. Guy Harris ( talk) 21:11, 23 August 2011 (UTC)
"a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked"
What the hell kind of opening sentence is that? It doesn't tell me at all what a computer library is. — Preceding unsigned comment added by 169.139.19.173 ( talk) 22:08, 14 August 2013 (UTC)
Hello fellow Wikipedians,
I have just modified 2 external links on Library (computing). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 08:55, 15 May 2017 (UTC)
I find this page somewhat forbidding (IBM OS/360? in the lead???) and a bit of a hairball.
For my personal wiki, I created a subpage "Linkable code library" for the portions of this page which relates to program linkage concerns (presently with subtopics static library and dynamic-link library).
That probably doesn't work here, but it sure makes my own wiki nicer than this one. :-) — MaxEnt 18:47, 13 September 2017 (UTC)
Currently the first line reads:
>In computer science, a library is a collection of non-volatile resources used by computer programs,
This sucks, I do not know who wrote it, and I doubt there's a citation to back it up.
In the past it was:
>In computer science, a library is a collection of subroutines or classes used to develop software.
Which is sensible, albeit not perfect.
And:
> In computer science, a library is a collection of implementations of behavior, written in terms of a language[disambiguation needed], that has a well-defined interface[disambiguation needed] by which the behavior is invoked.
Which is great, but it's very technical and needs to be backed up by a citation.
I have my own definition of software library, of course, but I will resist the temptation to add to the confusion by adding it. Instead, I'll be on the lookout for a citable definition. As soon as I find one, I'll cite it and add it here. If anybody reads this. Be on the lookout as well, and if you find one, remember this comment and add the definition to the article. But please, don't start googling "Definition of software library", just let yourself naturally find it, the end result will be much stronger. -- TZubiri ( talk) 04:34, 16 May 2020 (UTC)
The article doesn't make that clear. Azbookmobile ( talk) 21:16, 27 December 2022 (UTC)
In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications. In IBM's OS/360 and its successors they are referred to as partitioned data sets.
A library is also a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked. For instance, people who want to write a higher-level program can use a library to make system calls instead of implementing those system calls over and over again. In addition, the behavior is provided for reuse by multiple independent programs. A program invokes the library-provided behavior via a mechanism of the language. For example, in a simple imperative language such as C, the behavior in a library is invoked by using C's normal function-call. What distinguishes the call as being to a library function, versus being to another function in the same program, is the way that the code is organized in the system.
Library (computing) § Creation and Execution of Shared Library in Linux/Unix is a detailed example of how to build a shared library on some operating systems, oriented towards ELF-based systems and, in particular, Linux systems. It doesn't apply to non-ELF-based UNIXes ( macOS and AIX), it assumes use of gcc, and it assumes a requirement for running ldconfig to update the shared library cache, which I think may not have been necessary in some if not all versions of Solaris.
On top of that, it appears to read like "a "how-to" style" item, to use the description of what doesn't belong in Wikipedia from WP:NOTHOWTO.
So, while it might be a useful tutorial, I don't see it as being worthy of inclusion on Wikipedia (which is not intended to be a collection of all useful information of all types (as per the existence of Wikipedia:What Wikipedia is not). Guy Harris ( talk) 21:12, 22 July 2023 (UTC)
When I see the diffs someone has removed quite a large amount of content from this article. Is this intentional? Wikieditor 2027 ( talk) 07:08, 29 July 2023 (UTC)
Some recent changes to this history section about verb tense got me to read the section carefully. It did have a mix of verb tense. But even with the latest changes it still does. I see the challenge with historical info. Does Simula have classes or did it have classes? IDK, but I do think that consistent is better; easier to read.
but ... the paragraph about Simula seems off topic for the most part. Seems to be a primer on Simula. What does "its classes are nearly identical to the modern concept as used in Java, C++, and C#" have to do with libraries? I think this paragraph needs a total re-write. I think the interesting and on-topic idea is that classes could be included in a library as soon as the concept of class was realized in a language. Stevebroshar ( talk) 12:50, 7 April 2024 (UTC)
This is the
talk page for discussing improvements to the
Library (computing) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This
level-5 vital article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
This article is a mix of high-level gloss and a sampling of nitty-gritty details. It talks little about traditional libraries (I just added a couple of sentences at the top). Partially as a result, it has some inaccuracies and potential for people to misunderstand the things that are accurate. I think it needs a rework into a structure something like this:
I like your work so you have my encouragement to proceed. Daniel.Cardenas 13:39, 17 July 2006 (UTC)
Indeed - can't someone put this more into layman's terms? For most of the readers, this is gobbledygook.-- 173.69.135.105 ( talk) 00:52, 26 October 2011 (UTC)
There is an example in this article, but no description of the example at all and this is confusing. — Preceding unsigned comment added by Gachen ( talk • contribs) 13:44, 24 June 2012 (UTC)
I agree with the "clarification needed" marking on the first sentence. While it is highly general, I think it be rather opaque to most readers. I would suggest something not as general, but much more concrete:
In computer science, a library is a set of routines that are made available for use in multiple programs.
(Though I'm much more doubtful that editors would want to include text such the following) this may also be helpful:
The term arose by analogy to a traditional library that loans books to many patrons. In a traditional library, when one patron has finished using a book, they return it, and it can be used by another patron. (Of course, for a library of computer routines, there is generally no need for programs to wait their turn. Any number of programs could have simultaneously pulled out a copy of the routine for their use, and they do not need to "check the routine back in" when they have finished with it. Editing and altering a routine is a different matter. For that activity, one would generally need to control access.)
[1] refers to a "card library", which was actually used in the early days very much as a traditional library would be used.
MarkGoldfain ( talk) 23:32, 12 July 2013 (UTC)
References
I moved this from the article, since it really belogs here:
—
Frecklefoot 18:36, 18 Sep 2003 (UTC)
Gtfjbl ( talk) 02:00, 15 April 2009 (UTC)
I merged many library-related articles to here. The article looks too long but there is a lot of overlaps. The article can be compact. -- Taku 00:36, 22 Sep 2003 (UTC)
Hmm while checking "what links here" from metaprogramming I came across this talk. Would someone care to add information on what a metaprogramming protocol might be? -- Anon
Are static linking and dynamic linking supposed to be subtopics of library linking? If so the hierarchy is all skew. -- BozMo |talk 15:17, 16 Aug 2004 (UTC)
I think that the topic .Net Assemblies could also be mentioned here. Maybe I'am wrong but arent these the replacement for ActiveX Dll collections? Please discuss this here. tobias
"Dynamic linking systems place the majority of the linker code in the underlying operating system, in which case it is known as a loader."
What does "it" refer to in the sentence above?
In the section about Dynamic Linking you say:
Unix-based systems use a PATH variable of "places to look", which tends to be robust as the PATH rarely changes.
It sounds like you are reffering to the shell PATH variable. As far as I'm aware, none of the common UNIX variants uses the PATH environment variable to lookup shared objects (aka Dynamic Libraries). Instead there are: 1. Pre-defined, system-wide paths configured in files (e.g. /etc/ld.so.conf on Linux. See ldconfig(8) for more) 2. Possibly other environment variables to override/add to the directories in (1) (e.g. LD_LIBRARY_PATH, LD_PRELOAD and others on Linux).
The only resemblance to PATH in the above is that the environment variables, if defined, are usually in the format of the standard PATH variable used by the bourne-shell to lookup programs (i.e. directory names separated by commas).
I remember seeing somewere a list of the variations on this theme (of LD_LIBRARY_PATH equivalents on "exotiq" systems like HPUX and AIX) but can't find it right now, maybe a good place to begin digging is GNU libtool).
I'm adding this here because I'm not sure how to edit the article itself.
Thanks. Penedo 02:35, 28 Apr 2005 (UTC)
On
Linux, the environment variable LD_LIBRARY_PATH
, and not PATH
, affects the search for dynamic libraries
[1]. On
Mac OS X, the environment variables DYLD_LIBRARY_PATH
and DYLD_FALLBACK_LIBRARY_PATH
affect how the dynamic loader searches for libraries. Altering DYLD_LIBRARY_PATH
can break the system, as it can allow libraries in the new search path to overshadow system libraries; altering DYLD_FALLBACK_LIBRARY_PATH
, on the other hand, allows the dynamic loader to find libraries without negatively impacting the system
[2]. ←
Michael Safyan (
talk) 09:33, 13 January 2008 (UTC)
LD_LIBRARY_PATH
originally came from
SunOS 4.0's dynamic linking mechanism; that mechanism, complete with LD_LIBRARY_PATH
, was passed on to
System V Release 4 and thus to
Solaris. Linux,
FreeBSD and
NetBSD also inherited it from those sources when they re-implemented the SunOS 4.0 and/or SVR4 shared library mechanisms, and it passed on to
OpenBSD and
DragonFly BSD from the BSDs from which they forked.
Guy Harris (
talk) 19:20, 13 January 2008 (UTC)This article is nice. I want to put it in the Project's hierarchy up toward the top. We need more participants so I'm going to keep spamming discussion pages on articles like this one till we get some momentum going. Please JOIN Today!:
This article should probably be trimed down to the history of libraries in computer science in general and an introduction to specific types of computer libraries. Information about specific types of computer libraries and implemenations of libaries on specific platforms should probably be seperated out into other pages. For example, information about static libraries, shared libraries, and dynamic libraries should be merged into their respective articles. Information about Microsoft's Dynamic Link Libraries should be merged into the respective article. Jsmethers 02:40, 6 December 2005 (UTC)
The Day oF The Future Library has Yet To Come And Will Be Phenomenal the world over will want to read The Book in there. The World will transcend into the navigational prose of the preceded cosmological particulariousness Of Scorpions who effectively lead the transition from the sublime into the eschatologically glorious, right, UTownBB Peninsularic Homonoidisticalised of The Tall Back? I like Libraries. [(7xgooglecompressormoroomon.ra) 4.59am 1.3.4450.2 13th cycle of the 1st transition in the 3wax over the second millenium installer v1.0000324 internetExecPilatefHL] — Preceding unsigned comment added by 94.173.143.47 ( talk) 23:34, 5 November 2021 (UTC)
At the bottom of the "Dynamic Linking" section: "OpenStep used a more flexible system, collecting up a list of libraries from a number of kno or if an incompatible version of the DLL is copied to a place that is earlier in the search, the executable could malfunction or even fail to load. On Windows this is commonly known as DLL hell." It seems that the text after the letters "kno" has been removed. BTW -- excellent article Jsminch 07:04, 16 December 2005 (UTC)
Thanks for the fix. Jsminch 08:28, 20 January 2006 (UTC)
Remote procedure calls already handled these tasks, but there was no standard RPC system.
On another wiki page, there was once a "drawbacks" section. It has been removed instead of being moved, saying there was no evidence! IMHO this has been done by somebody who likes dynamic libs too much : there is no real need for evidence since it is "by-design", it only needs citations and sources. Anyway, here is a link : http://en.wikipedia.org/?title=Linker&oldid=38884120#Criticism I'd like somebody with more knowledges than me to correctly add this to the Library page. I'll wait until next and do it myself if needed. Thanks. —The preceding unsigned comment was added by Camarade Tux ( talk • contribs) 01:25, 6 July 2006 (UTC).
Library (computer science) → Library (computing) – This is not an academic topic, so a more general name is appropriate. – Smyth\ talk 20:39, 25 September 2006 (UTC)
Add "* Support" or "* Oppose" followed by an optional one-sentence explanation, then sign your opinion with ~~~~
Add any additional comments
This article has been renamed as the result of a move request. Vegaswikian 19:29, 2 October 2006 (UTC)
The current section on Relocation reads as follows (italics are mine):
That last statement seems absurd to me. There would be have to be some regulatory system established to ensure that "[every version of] every library ever written" used a unique memory address range, such that there was no overlap. And when you add in my comment ("every version of") it readily becomes apparent that exhaustion of the (constantly-shrinking available portion of the) 64-bit address space wouldn't take that long. Not to mention that the overhead of having the operating system perform a virtual <==> physical address mapping for every operation of every library call would probably nullify any benefit such a system would provide. I think the statement was just a whimsical addition, and unless it can be grounded by some reputable citations, I think it should be removed.— Kbolino 04:35, 20 March 2007 (UTC)
A "standard library" is no library, but a set of requirements a library must adhere to. IOW it's more analogous to POSIX being a set of OS requirements than POSIX being an OS. 88.159.74.100 09:08, 9 July 2007 (UTC)
The link: Shared Libraries - 'Linkers and Loaders' by John R. Levine ( http://www.iecc.com/linker/linker09.html) does not seem to be working. It would be interesting to find a replacement. I'm not able to propose anything else because I don't know the exact content of the article, sorry. Seriousch 09:19, 19 August 2007 (UTC)
Why are libraries called libraries? Who invented them? When did they first appear? When were they first standardised?
Alksentrs ( talk) 01:04, 25 November 2007 (UTC)
Enderz Game ( talk) 20:48, 9 May 2011 (UTC)
I'm pretty sure the inventor of the computer program sub-routine library was a guy named John Wheeler. He was part of the team at the Cambridge Mathematical Laboratory that developed the EDVAC computer in the late 1940's. He co-wrote a book called, "Programs for an electronic digital computer" that was published in 1951 containing a detailed description of the process that they developed for "linking and loading" multiple sub-routines into a single executable program. The caption below one of the pictures at the beginning of the book reads, "The library of tapes on which subroutines are punched is contained in the steel cabinet shown on the left. The operator is punching a program tape on a keyboard perforator. She can copy mechanically tapes taken from the library on to the tape she is preparing by placing them in the tapereader shown in the center of the photograph." He's credited as the inventer of the sub-routine (a "Wheeler Jump" was slang for a sub-routine call) and the team at Cambridge seems to have focused on standardizing the process used to prepare programs for a shared library and defining the conventions as part of deliberated strategy for their re-use.
Article sez:
OpenStep used a 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 there is a time cost when first starting the system.
So this is "more flexible" than what? Presumably "everything else", I guess...:-)
"causes no problems at all" feels just a wee bit glib as well. It's been a long time since I touched Nextstep/OpenStep, so I can't remember exactly what problem this is solving, and why, if the list is only collected at boot time, this means moving libraries around would not cause a problem. Does the kernel detect library or parent directory mv
s and automatically update its link path? Does it track libraries by inode or equivalent? How about installing new libraries? Or is what this really is doing is hashing library locations for faster runtime loading? Can individual programs override this if they choose? I'm not feeling the "flexible" here from the information provided.--
NapoliRoma (
talk) 21:54, 1 January 2008 (UTC)
{{Merge|library (computer science)|date=November 2009}}
This edit undid a considerable amount of copyediting, along with making the article less future-proof by giving specific examples of Unix-like OSes instead of generalising the issue to all modern instances. It should be reverted. Chris Cunningham (not at work) - talk 18:09, 2 March 2009 (UTC)
Nowhere on this page, the concept of Incremental Linking is described. I would like to know what that concept is, but could not find it. —Preceding unsigned comment added by 209.139.213.73 ( talk) 22:20, 1 April 2009 (UTC)
I guess what is meant in the last sentence is dynamic loading. As dynamically linked libraries can imho also be pure program-startup-time-type libraries (vs. program-runtime-type libraries), the given sentence may even be wrong. -- Abdull ( talk) 11:15, 3 March 2010 (UTC)
The Multics system, where dynamic linking was invented, was able to dynamically link to segments that were not in a library at all. While there was a Binder, its use was optional; it allowed you to bundle related segments for reasons of configuration management or efficiency. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 20:13, 12 July 2010 (UTC)
Prior to the advent of personal computers and Unix, there were two prominent systems that provided dynamic linking. Due to differences in hardware architecture, the systems differed in when recursive linking took place.
The hardware for Multics supported indirect addressing and there was a tag field as part of the indirect address; some values of the tag cuased a fault (interrupt). The linkage information for an unresolved segment reference included the name of the segment, so that when a call caused a trap the dynamic linker could locate the proper segment, assign it a segment number, load it and place its entry address in the indirect address word.
The hardware for the IBM 360/67 did not have an equivalent mechanism. As a result, the designers of TSS/360 had to use a different strategy. Whenever the operating system loaded a load module, it assigned virtual storage for all subroutines called by that module, and marked the pages as assigned but invalid. A call to one of those subroutines would cause a program check interrupt, and the operating system would load the page as described above, possibly assigning storage for additional subroutines in the process.
The article should reflect the distinction between these two strategies and indicate which system uses which strategy. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 20:33, 12 July 2010 (UTC)
I wouldn't consider a system call that starts another process to be dynamic linking.Who indicated that it was? I didn't. I mentioned the image activation process as the way the run-time linker gets started; what's relevant in my description is the run-time linker, which is what handles dynamically-linked libraries.
default_error_handler_
) calling the command interpreter (see subsection 7.3.2.1).linkage_error
condition is signaled.What is the mechanism in *ix for a program to dynamically call a subroutine *in the same process*?Call it, given a character-string value, in your programming language, containing the name for the subroutine? For that, it would be dynamic loading; the same is the case on Windows. Or call it in the regular fashion in your programming language, but from a dynamically-linked library? For that, it would be the mechanism I described. Guy Harris ( talk) 21:40, 26 February 2021 (UTC)
A normal call doesn't involve passing the name of the subroutine.I.e., by "dynamically call a subroutine in the same process", you mean "call it in the regular fashion in your programming language, but from a dynamically-linked library", in which case, as I said, I've already described how that happens.
off the top of my head, could a program be linked to dynamically link to x and then change the appropriate control blocks during execution to change x to whatever?Are you talking about "in OS/360 and its successors" (given the term "control blocks"), or are you talking about "in UN*Xes and Windows"? For the latter, who's doing the change? If you mean the program itself, at least in UN*Xes, the program's
main()
function isn't called until after the shared libraries are mapped in, so it can't change that; if it could find the function names pointed to by the PLT entries, it could conceivably change the names of the functions to be called before they're called.
Guy Harris (
talk) 21:40, 26 February 2021 (UTC)
Notes
Imagine there is a shared library with a static variable. This static variable is used by one or more subroutines within this shared library. Now imagine, two or more programs use this shared library. How will these programs handle the static variable? Will these programs share it and mess with each other program's state? Or will every program make its own local copy of the variable? Thanks, -- Abdull ( talk) 22:47, 12 August 2010 (UTC)
Historically, libraries have been used to store a wide variety of objects, e.g., documentation, source code, test data. This is still common on, e.g., IBM mainframes. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 19:31, 16 August 2010 (UTC)
Sorry, but I think that an unsourced statement about how this term was used in IBM OS/360 should not trump modern and more widespread usage for the opening paragraph. The OED defines a library as "an organized collection of routines." Computer pioneers Goldstine & von Neumann (1947) and Wilkes & Wheeler (1951) also use it to mean a collection of routines. A collection of routines, functions or methods is still the modern usage. I don't see much support for the idea that libraries include documentation or data. Jno.skinner ( talk) 04:23, 26 February 2021 (UTC)
“A fundamental flaw of Microsoft Windows is that it can only link in a library at loadtime, before the process starts executing; others can wait until after the process has started to execute and link in the library just when it is actually referenced (i.e., at runtime).”
Microsoft added delayed loading of statically linked libraries in VC++ 6.0 [3]; (which is more than 10 years ago) note that this was an addition to VC++ and not to the windows kernel, which indicates that this "fundamental flaw" probably has never existed, and is speculation at best.
If Microsoft Windows did in fact not support linking a library at runtime, I'd like to see a reference or citation. 84.48.103.151 ( talk) 17:45, 20 December 2010 (UTC)
The result of the move request was: not moved, per lack of consensus — Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • ( yo?); March 17, 2011; 17:06 (UTC) 17:06, 17 March 2011 (UTC)
Library (computing) → Software library — Avoid parenthetical disambiguation with a natural and recognizable term. -- Pnm ( talk) 01:27, 13 February 2011 (UTC)
The static library article discusses libraries that, when linked with a program, have modules from the library copied into the executable image of the program. The "static libraries" section mostly discusses that process.
There were, in System V Release 3, a form of shared library that, as I remember, was not as dynamic as the SunOS 4.0 shared library mechanism from which the System V Release 4 shared library mechanism, as used by SVR4 derivatives such as Solaris as well as Linux distributions and BSD systems that adopted the ELF executable image format. I think Linux had a shared-library mechanism before the adoption of the SVR4 shared library mechanism; I don't know how dynamic it was.
My memories of this, from when I was at Sun and Sun and AT&T were engaged in the discussions that led to SVR4, are a bit faded; I can try digging up information about the SVR3 shared library mechanism, but if anybody's memories are better than mine, if they could contribute, that might be nice. Guy Harris ( talk) 21:00, 23 August 2011 (UTC)
Recently, the "shared libraries" section was changed to say "Static libraries are usually only shared at compile time" rather than "Static libraries, by definition, cannot be shared". I'm assuming "compile time" here means, on most platforms, "link time", i.e. the time at which one or more object modules built as part of a program, and object modules from a static library, are combined into an executable image.
The "shared libraries" section speaks of two different types of sharing:
The sharing in "Static libraries are usually only shared at compile time" is presumably referring to the first of those types of sharing; it's unlikely that the OS will be able to arrange that separate copies of a given routine in multiple executable images be stored in the same physical page of RAM. That code could be described as "shared", in the first sense, in that multiple programs built with the same library don't need to build their own copies of that code, so that the build processes for those programs read the routines from a single copy on disk in the library file, but the executable image files for those programs have their own separate copies of the routines on disk, rather than referring to a shared copy in the static library. Guy Harris ( talk) 21:11, 23 August 2011 (UTC)
"a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked"
What the hell kind of opening sentence is that? It doesn't tell me at all what a computer library is. — Preceding unsigned comment added by 169.139.19.173 ( talk) 22:08, 14 August 2013 (UTC)
Hello fellow Wikipedians,
I have just modified 2 external links on Library (computing). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 08:55, 15 May 2017 (UTC)
I find this page somewhat forbidding (IBM OS/360? in the lead???) and a bit of a hairball.
For my personal wiki, I created a subpage "Linkable code library" for the portions of this page which relates to program linkage concerns (presently with subtopics static library and dynamic-link library).
That probably doesn't work here, but it sure makes my own wiki nicer than this one. :-) — MaxEnt 18:47, 13 September 2017 (UTC)
Currently the first line reads:
>In computer science, a library is a collection of non-volatile resources used by computer programs,
This sucks, I do not know who wrote it, and I doubt there's a citation to back it up.
In the past it was:
>In computer science, a library is a collection of subroutines or classes used to develop software.
Which is sensible, albeit not perfect.
And:
> In computer science, a library is a collection of implementations of behavior, written in terms of a language[disambiguation needed], that has a well-defined interface[disambiguation needed] by which the behavior is invoked.
Which is great, but it's very technical and needs to be backed up by a citation.
I have my own definition of software library, of course, but I will resist the temptation to add to the confusion by adding it. Instead, I'll be on the lookout for a citable definition. As soon as I find one, I'll cite it and add it here. If anybody reads this. Be on the lookout as well, and if you find one, remember this comment and add the definition to the article. But please, don't start googling "Definition of software library", just let yourself naturally find it, the end result will be much stronger. -- TZubiri ( talk) 04:34, 16 May 2020 (UTC)
The article doesn't make that clear. Azbookmobile ( talk) 21:16, 27 December 2022 (UTC)
In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications. In IBM's OS/360 and its successors they are referred to as partitioned data sets.
A library is also a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked. For instance, people who want to write a higher-level program can use a library to make system calls instead of implementing those system calls over and over again. In addition, the behavior is provided for reuse by multiple independent programs. A program invokes the library-provided behavior via a mechanism of the language. For example, in a simple imperative language such as C, the behavior in a library is invoked by using C's normal function-call. What distinguishes the call as being to a library function, versus being to another function in the same program, is the way that the code is organized in the system.
Library (computing) § Creation and Execution of Shared Library in Linux/Unix is a detailed example of how to build a shared library on some operating systems, oriented towards ELF-based systems and, in particular, Linux systems. It doesn't apply to non-ELF-based UNIXes ( macOS and AIX), it assumes use of gcc, and it assumes a requirement for running ldconfig to update the shared library cache, which I think may not have been necessary in some if not all versions of Solaris.
On top of that, it appears to read like "a "how-to" style" item, to use the description of what doesn't belong in Wikipedia from WP:NOTHOWTO.
So, while it might be a useful tutorial, I don't see it as being worthy of inclusion on Wikipedia (which is not intended to be a collection of all useful information of all types (as per the existence of Wikipedia:What Wikipedia is not). Guy Harris ( talk) 21:12, 22 July 2023 (UTC)
When I see the diffs someone has removed quite a large amount of content from this article. Is this intentional? Wikieditor 2027 ( talk) 07:08, 29 July 2023 (UTC)
Some recent changes to this history section about verb tense got me to read the section carefully. It did have a mix of verb tense. But even with the latest changes it still does. I see the challenge with historical info. Does Simula have classes or did it have classes? IDK, but I do think that consistent is better; easier to read.
but ... the paragraph about Simula seems off topic for the most part. Seems to be a primer on Simula. What does "its classes are nearly identical to the modern concept as used in Java, C++, and C#" have to do with libraries? I think this paragraph needs a total re-write. I think the interesting and on-topic idea is that classes could be included in a library as soon as the concept of class was realized in a language. Stevebroshar ( talk) 12:50, 7 April 2024 (UTC)