GNU C库的实现在哪里? [英] Where is the implementation of the GNU C library?

查看:93
本文介绍了GNU C库的实现在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览/usr/include中的glib头文件,以了解幕后情况.我正在查看的所有文件都只声明了一堆宏和函数,但我想看看这些函数的实现.

I'm looking through the glib header files that reside in /usr/include to get a feel for what is going on behind the scenes. All the files I'm looking at simply declare a bunch of macros and functions but I want to take a look at the implementation of these functions.

推荐答案

glibc源代码库在这里:

The glibc source repository is here:

https://sourceware.org/git/?p=glibc.git; a = tree

请注意,很多有趣的代码位于 sysdeps 目录下,尤其是 sysdeps/unix/sysv/linux/* .同样值得注意的是,stdio在 stdio-common libio 之间分开,并且所有POSIX线程接口都在 nptl 下实现(有自己的 sysdeps 树.

Note that a lot of the interesting code is under the sysdeps directory, particularly sysdeps/unix/sysv/linux/*. Also worth noting is that stdio is split between stdio-common and libio, and all of the POSIX threads interfaces are implemented under nptl (which also has its own sysdeps tree.

此外,请注意,有很多功能根本无法找到源代码.许多标准功能只是用于调用内核(系统调用)的入口点,而这些包装器是在构建过程中自动生成的.

Further, note that there are a lot of functions for which you will simply not find source code at all. Many of the standard functions are simply entry points for making calls to the kernel (syscalls), and these wrappers are automatically generated as part of the build process.

这篇关于GNU C库的实现在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆