[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: A silly question ..



On Wed, Oct 03, 2001 at 10:21:49PM +0530, shyamk@eth.net <shyamk@eth.net> wrote:
| If I install glibc , does that mean that in some way , I can run C programs , compile
| kernels , etc ?

"Run C programs." And, in the long run, damn near everything else.

| What really is glibc ?

Glibc is the fairly central library needed by almost everything on a GNU
system. It is the GNU implementation of what is "libc" on most non-GNU
platforms, which provides the STDC+POSIX API layer, which is the basis of
"UNIX" programming environments.

A small diagram:

	kernel
	  |
	glibc
	  |
      +-+-+-+.....+
      | | | |     |
      other stuff ...

The kernel is the OS itself, in this case Linux. It is the interface
between the hardware (CPU, drives etc) and all user level software. It
supplies namespaces (filesystems) and the core kernel API, which is
actually quite small: open, read, write and a bunch of other basic
services that present the system.

The facilities provided by the kernel are quite basic.

All UNIX platforms provide a further layer built on the kernel API
which comes in two main parts:

  - The Standard C Library, which all platforms supportnig C compilation
    provide (some embedded systems excepted) and which therefore all C
    programs may expect. This includes things like malloc() to allocate
    memory, the strchr() et al calls to manipulate strings etc.

  - The POSIX layer, which is partly a formalisation of some minimum
    functions supplied by the kernel and a set of other things.
    Also, various other "OS level" standards based upon POSIX like
    X/OPEN et al fall into this category and are supplied by many libc
    libraries, and the GNU libc tries to cover these bases too.

Damn near every other library assumes that libc (glibc for you) is present.
Also, a libc and thus glibs will supply a few utility functions possibly not
part of any formal standard.

Now, this library is loaded when programs start up, and so your system will
pretty well not run at all without it.

For the term "compile C programs" you probably mean the "glibc-devel"
package, which is the set of #include headers needed by C programs to
describe the stuff in the library. Possibly also a debugging version of
the library etc.

Argh. Stop me before I ramble some more...
-- 
Cameron Simpson, DoD#743        cs@zip.com.au    http://www.zip.com.au/~cs/

Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit
patch to an 8 bit operating system originally coded for a 4 bit
microprocessor, written by a 2 bit company.    
	- Alex Satrapa <packrat@blitzen.canberra.edu.au>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []