Re: compiler, linker and libraries (Marco van de Voort)
3 Jul 2001 23:22:42 -0400

          From comp.compilers

Related articles
compiler, linker and libraries (TC Shen) (2001-06-21)
Re: compiler, linker and libraries (Lionel Brits) (2001-06-28)
Re: compiler, linker and libraries (Matthew J. Lockner) (2001-07-01)
Re: compiler, linker and libraries (2001-07-03)
| List of all articles for this month |

From: (Marco van de Voort)
Newsgroups: comp.compilers
Date: 3 Jul 2001 23:22:42 -0400
Organization: Eindhoven University of Technology, The Netherlands
References: 01-06-059 01-06-068
Keywords: design
Posted-Date: 03 Jul 2001 23:22:42 EDT

Lionel Brits wrote:
> A library is just a collection of object files stored in a single file that
> can be used by more than one program (the idea of reusable code).
> Libraries can be statically linked by the linker, so that only the parts
> that are needed are included in the executable file, or they can be
> dynamically linked when the executable is run, such as .DLL files in the
> windows architecture.

Often there is also a special library that isn't called directly, but calls
to its functions are generated by the compiler.

For the GNU range of compilers, this library is called libgcc.

The contents of such library are often functions to do (depending on
language of course. I'm a bit Pascal orientated:)
- calculations with types larger than the processor can handle.
- object constuctor/deconstructor helpers
- Set handling. (Pascal, Wirthian languages in general)
- Stack unwinding for exceptions (C++, Object Pascal) (separate lib for
      GNU IIRC)
- reference counting helpers (ansistrings, dynamic helpers)
- interprocedural goto (standard Pascal)
- String type helper (Object Pascal, Extended Pascal) (copy, length, realloc)
- helpers for special heap functions
- RTTI (runtime type information)
- Compare, fill,Move, copy of mem locations

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.