Re: [PATCH v5 3/6] libc.7: Revise content

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

 



Hi Branden,

On 1/15/23 06:43, G. Branden Robinson wrote:
* Define the term "standard C library".
* Say who's responsible for standardizing it.
* Practically all C _libraries_ use libc, too.
* Move material describing structure glibc from intro(3) to here and
   recast in more detail.
* Update example filespec for libc.so.6.

Signed-off-by: G. Branden Robinson <g.branden.robinson@xxxxxxxxx>
---
  man7/libc.7 | 34 ++++++++++++++++++++++++++--------
  1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/man7/libc.7 b/man7/libc.7
index c6180075c..09d21e7f5 100644
--- a/man7/libc.7
+++ b/man7/libc.7
@@ -8,13 +8,18 @@
  libc \- overview of standard C libraries on Linux
  .SH DESCRIPTION
  The term \(lqlibc\(rq is commonly used as a shorthand for
-the \(lqstandard C library\(rq
-a library of standard functions that can be used by all C programs
-(and sometimes by programs in other languages).
-Because of some history
-(see below),
-use of the term \(lqlibc\(rq
-to refer to the standard C library is somewhat ambiguous on Linux.
+the
+.IR "standard C library" ,
+a collection of functions,
+data types,
+constants,
+and global variables \" like errno
+defined by ISO/IEC JTC1/\:SC22/\:WG14 and POSIX.1
+(the Austin Group)

I'd just call it ISO C and POSIX.1, and defer to standards(7) for more details about the Austing group, WG14, and company.

+and used by practically all programs and libraries written in C.

And actually, non-C too, unless you write static binaries :)

+.I libc
+refers to any library that implements a significant portion of the
+published standard interface.
  .SS glibc
  The standard libc most popularly used with the Linux kernel is
  .UR http://www.gnu.org\:/software\:/libc/
@@ -33,13 +38,26 @@ primarily in section 3 of the manual.
  glibc also offers a manual of its own in Texinfo format,
  browsable at the command line with
  .RI \(lq "info libc" \(rq.
+.PP
+glibc is organized into three

Why precise about glibc? A programmer should only care about the standard for these, right? If POSIX specifies some organization, programmers should normally link against the library that POSIX specifies. If POSIX says foo(3) is in libfoo.so, but glibc puts it in libbar.so, I will only document what POSIX says (of course glibc will make the magic so that a POSIX-conformant program would work).

This reminds me that I had a pending task: make sure that LIBRARY contents are right according to POSIX.

+.I dynamic shared objects
+(DSOs):
+.I libc
+itself,
+.I libm
+for mathematical functions,
+and
+.I librt
+for real-time extensions
+(historically POSIX.1b).

Is it? I thought there were more libraries. I'm thinking about libpthread, and maybe some others.

  Version 1.0 of glibc was released in September 1992.
  (There were earlier 0.x releases.)
  The next major release of glibc was 2.0
  at the beginning of 1997.
  .PP
  The file
-.I /lib/libc.so.6
+.IR /lib/libc.so.6 ,
+.IR /lib/x86_64\-linux\-gnu/libc.so.6 ,

How about adding a FILES section?

Cheers,

Alex

  or similar
  is normally a symbolic link to the glibc library.
  Execute it to display information about the version installed on your

--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux