l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2003 Apr 24 14:13

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] Re: [vox] libc6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] Re: [vox] libc6



On Thu, 24 Apr 2003, Mark K. Kim wrote:

> glibc is same as libcN, where N is 6 IIRC.

C compilers may depend on two types of function calls:
implementation-specific calls that the compiler can rely on to accomplish
certain tasks, and "standard" interfaces that the programmer wants to see
(POSIX, ISO).  Often the implementation depends on macros to connect
"standard" functions to implementation-specific ones.

"libc" is a concept that combines these two needs.  Seems like a bad idea
to me, but that is the way it goes.

"libc6" is a kind of API developed by the glibc team that is supposed to
support the requirements of the "libc" concept while supporting a growing
set of available functions in the interface with backward compatibility
(old programs can use new libraries).  glibc is an implementation of the
libc6 API. Thus, a particular version of glibc can be symlinked as a
variant of libc6 and fulfill all of the requirements of equal and earlier
versions of glibc. It does this by associating the semantics (meaning) and
syntax (name, return type and parameters) of a function call with a
function name that includes the glibc version.  As long as subsequent
versions of glibc don't change the semantics of that function, it will
retain that "old version" notation.  If they introduce changes to the
semantics (correct constant values, etc) that can be covered by macros
during compilation, then they introduce an additional versioned function.  
The old binaries continue to use the old interface (so the new library may
have to alter the implementation of the old interface to work in the new
environment) while new programs will be compiled to use the new interface.

This means that you cannot look at the name of a libc6 file and know if
your binary will link to it... the binary may reference functions that
were introduced by a later version of glibc.  The symptom of new binaries
with old libraries is, unfortunately, usually a segfault.  Thus "ldd
yourbinary" is not as useful as it might seem, though "nm yourbinary" will
show you which function interfaces are in use.

You can see the API of your glibc library using "nm -D /lib/libc.so.6".

[...]

> On Thu, 24 Apr 2003, Peter Jay Salzman wrote:
> 
> > even i don't know if this is a vox or vox-tech question.  hah.  :)

Seems pretty clearly vox-tech to me.

> >
> > is the GNU C library officially called libc6 or glibc?  the debian
> > package calls it libc6 (libc version 6), but i see references to glibc
> > all over the place.  what's the official name for this library?

Depends on context.  The linkage name is libc6, and the actual library is
glibc. Both are "official". (Someone could clone the interface and supply
"salzmanlib" symlinked to libc6, but it wouldn't help them much unless
they altered the standard headers too.)

> >
> > also, do *BSD systems use GNU stuff as well?   or do they have their own
> > set of tools?

Dunno.

> > are there any other unix variants that officially use GNU stuff?

Dunno.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.