Re: [25% OT] C library integral part of OS/kernel???

From: Mark McIntyre (markmcintyre_at_spamcop.net)
Date: 03/08/05


Date: Tue, 08 Mar 2005 11:56:16 +0000

On Tue, 08 Mar 2005 11:49:08 +0530, in comp.lang.c , Ravi Uday
<raviuday@gmail.com> wrote:

>Dan Pop wrote:
>> In <ln1xaswcp0.fsf@nuthaus.mib.org> Keith Thompson <kst-u@mib.org> writes:
>>
>>>My guess is that there's only one implementation of the strlen()
>>>function, and that it's callable either from the kernel or from user
>>
>> Your guess is typically wrong: a kernel is a freestanding program
>> and it doesn't rely on any external library,
>>
> So, when an executable gets built, then there are two copies of C
>library functions

Maybe, maybe not. Dan's guess is probably as wrong as Keiths, and both are
just as possibly right. Indeed if you read what Keith said, its not even
incompatible with Dan's comment.

For example the kernel may provide a service to allow userland apps to call
its version of the C library functions. Or the two may both use an
physically external library and there may be one shared copy in memory, or
two separate copies one in userspace and one in kernelspace, or there may
be two or more physical copies of the library on disk - consider that you
probably have executables built with microsoft, gnu and borland C, each
providing their own library, possibly more than one, if different versions
of the compiler were used.

-- 
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


Relevant Pages

  • Re: Processing workload distribution
    ... makes into the kernel, ... In addition, there are library functions for C language programs, a lot ... of which are built on top of the system calls. ... is why perl can be built with different mallocimplementations on most ...
    (comp.lang.perl.misc)
  • Re: PAR/PP on Windows XP with ActiveState
    ... >Executables built this way will need a separate perl5x.dll or ... >is built as a shared library. ... Either this is a bug in pp icon insertion or your icon file is ...
    (comp.lang.perl.misc)
  • Re: [25% OT] C library integral part of OS/kernel???
    ... >> So, when an executable gets built, then there are two copies of C ... >>library functions (one copy of functions used by kernel and other by ... > any given standard library function. ... the inline expansions are merely an implementation detail, ...
    (comp.lang.c)
  • Re: Compile in Linux but run under window 2000
    ... building the toolchain is not an oversimplified ... the executables i built from my codes (admittedly, ...
    (comp.lang.fortran)
  • dlopen() returns EACCESS
    ... executable and the modules) were built with compilers under AIX 4.x and ... we're trying to run them on AIX 5.2. ... problems mixing new executables with old shared libraries but in this case I ... beleive both were built with the same compiler. ...
    (comp.unix.aix)