Penguin

Differences between version 5 and predecessor to the previous major change of Library.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 5 Last edited on Wednesday, March 24, 2004 9:34:41 am by AristotlePagaltzis Revert
Older page: version 4 Last edited on Friday, February 20, 2004 12:51:31 pm by AristotlePagaltzis Revert
@@ -1,8 +1,7 @@
-A set of (compiled) functions that are available for programs to use is often put into libraries . On [Linux] machines libraries are called libXXXX.so.A.B.C where XXXX is the name of the library and A.B.C is an optional version number. Executables can link against a library at [CompileTime] (called static linking) or at [RunTime] (called dynamic linking). Static linking is required for certain system executables (such as the [Kernel] and the linker) but is generally avoided because it leads to much larger execuatables, much larger memory footprints (because statically linked libraries can 't be shared) and the need to recompile every executable to ensure a bug fix in a library propogates to all executables.  
+''Note: if you are looking for books, software etc to borrow, see WlugLibrary .''  
  
-On win32 platforms the most common form of library is a DynamicLinkLibrary (DLL)
+A [Library] is basically a piece of pre-compiled code, usually a set of functions, used by many programs. It is therefor made available as a separate entity so the code can be reused between them. [BinaryExecutable]s can be linked against a library either statically or dynamically
  
-----  
-If you are looking for books , software etc to borrow , see WlugLibrary
+Static linking means that the library is bound to the executable at [CompileTime] (or more precisely, link time), and the library is embedded in the BinaryExecutable. This has a number of drawbacks: the memory footprint of the program both on disk and in memory increases, because statically linked libraries cannot be shared, and it has to be relinked (which usually means it needs to be recompiled) for bug fixes in a library to propagate to the programs using it. However , some programs like the [Kernel] and the linker must be statically linked since the dynamic linker is not available at the time of their execution. Also, static linking also reduces load time of an executable and hardens executables against a cracker using library preload to tamper with their operation. It may therefor be wise to link a select set of binaries statically , at least on exposed hosts
  
-If you are looking for how to write shared libraries , see SharedLibrary. 
+Dynamic linking on the other hand happens at [RunTime] and is the common form of linking. It requires the [Library] to take a special form, called SharedLibrary for obvious reasons on most systems , and commonly stored in files named __lib''foo''.so.''m.n.o''__ where ''foo'' is the name of the SharedLibrary and ''m.n.o'' is an optional version number. Only [Windows] invents its own terminology and calls them [DLL]s