🌐
GitHub
github.com › bminor › glibc
GitHub - bminor/glibc: Unofficial mirror of sourceware glibc repository. · GitHub
Unofficial mirror of sourceware glibc repository. Contribute to bminor/glibc development by creating an account on GitHub.
Starred by 1.9K users
Forked by 469 users
Languages   C 71.0% | Assembly 12.4% | C++ 7.2% | Pawn 6.0% | Makefile 1.1% | Python 1.0%
🌐
GitHub
github.com › oracle › glibc
GitHub - oracle/glibc: Unofficial mirror of http://sourceware.org/git/glibc.git · GitHub
This repository contains the source code of Oracle Linux (OL) glibc RPMs for each OL glibc release and update, in a source tree format. The content is obtained by applying the OL glibc RPM patches to the OL glibc RPM source tarball.
Author   oracle
🌐
GitHub
github.com › bminor › glibc › blob › master › malloc › malloc.c
glibc/malloc/malloc.c at master · bminor/glibc
glibc in all parts of the code. Do not look for much commonality · with the ptmalloc2 version. · * Version ptmalloc2-20011215 · based on: VERSION 2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee) · * Quickstart · · In order to compile this implementation, a Makefile is provided with ·
Author   bminor
🌐
GitHub
github.com › lastweek › source-glibc
GitHub - lastweek/source-glibc: notes about glibc, ld-so and more. · GitHub
notes about glibc, ld-so and more. Contribute to lastweek/source-glibc development by creating an account on GitHub.
Starred by 40 users
Forked by 6 users
Languages   C 70.2% | Assembly 20.8% | Roff 3.4% | C++ 2.1% | Makefile 0.8% | Python 0.7%
🌐
GitHub
github.com › lastweek › source-glibc › blob › master › glibc-2.30.tar.xz
source-glibc/glibc-2.30.tar.xz at master · lastweek/source-glibc
lastweek / source-glibc Public · Notifications · You must be signed in to change notification settings · Fork 6 · Star 41 · master · / Copy path · More file actions · More file actions · History · History · 15.8 MB · master · / ...
Author   lastweek
🌐
GitHub
github.com › jueve › build-glibc
GitHub - pitchsys/build-glibc: A note of building The GNU C Library(https://www.gnu.org/software/libc/) · GitHub
# git clone https://sourceware.org/git/glibc.git # git --work-tree=/root/workdir/glibc --git-dir=/root/workdir/glibc/.git checkout release/2.31/master
Starred by 36 users
Forked by 3 users
🌐
GitHub
github.com › topics › glibc
glibc · GitHub Topics · GitHub
🎁A convenient glibc binary and debug file downloader and source code auto builder · pwn ctf glibc · Updated · Oct 22, 2025 · Shell · Star 771 · IDA Pro plugin to examine the glibc heap, focused on exploit development · python exploit ...
🌐
GitHub
github.com › emuikernel › glibc
GitHub - emuikernel/glibc: git://sourceware.org/git/glibc.git
git://sourceware.org/git/glibc.git. Contribute to emuikernel/glibc development by creating an account on GitHub.
Starred by 2 users
Forked by 2 users
Languages   C 73.8% | Assembly 15.8% | Roff 3.7% | C++ 3.5% | Objective-C 0.8% | Makefile 0.7% | C 73.8% | Assembly 15.8% | Roff 3.7% | C++ 3.5% | Objective-C 0.8% | Makefile 0.7%
🌐
GitHub
github.com › andikleen › glibc
GitHub - andikleen/glibc: Linux C Library development
v16: Manual updates Remove ifdefs in test code Define and enforce flags per mutex/rwlock tuning interfaces Remove extra defines. Make some comments more verbose. Lock elision using TSX is a technique to optimize lock scaling. It allows to run existing locks in parallel using hardware memory transactions. New instructions (RTM) are used to control memory transactions. The full series is available at http://github.com/andikleen/glibc git://github.com/andikleen/glibc rtm-devel9
Starred by 36 users
Forked by 15 users
Languages   C 80.6% | Assembly 15.8% | C++ 1.7% | Objective-C 1.1% | Shell 0.4% | Logos 0.2% | C 80.6% | Assembly 15.8% | C++ 1.7% | Objective-C 1.1% | Shell 0.4% | Logos 0.2%
Find elsewhere
🌐
GNU
gnu.org › software › libc › sources.html
The GNU C Library (glibc) Documentation
You can contact the developer community by emailing the developer list libc-alpha@sourceware.org. The GNU C Library can be found on the main GNU ftp server (download glibc via HTTPS, download glibc via HTTP or download glibc via FTP), and its mirrors; please use a mirror if possible.
🌐
GNU
gnu.org › software › libc › libc.html
The GNU C Library - GNU Project - Free Software Foundation
You can contact the developer community by emailing the developer list libc-alpha@sourceware.org. The GNU C Library can be found on the main GNU ftp server (download glibc via HTTPS, download glibc via HTTP or download glibc via FTP), and its mirrors; please use a mirror if possible.
🌐
GitHub
github.com › openlgtv › glibc
GitHub - openlgtv/glibc · GitHub
You can find glibc-ports-VERSION distributed separately in the same place where you got the main glibc distribution files. Currently these configurations are known to work using the `ports' add-on: alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL arm-*-linux-gnu Requires Linux 2.6.15 for NPTL, no SMP support arm-*-linux-gnueabi Requires Linux 2.6.16-rc1 for NPTL, no SMP mips-*-linux-gnu Requires Linux 2.6.12 for NPTL mips64-*-linux-gnu Requires Linux 2.6.12 for NPTL The ports distribution also contains code for other configurations that do not work or have not been maintained recently, but will be of use to anyone trying to make a new configuration work.
Forked by 2 users
Languages   C 83.3% | Assembly 13.8% | C++ 0.8% | Makefile 0.8% | TeX 0.5% | Shell 0.4%
🌐
Launchpad
code.launchpad.net › glibc
Git : Code : GLibC
This repository is an import of the Git repository at git://sourceware.org/git/glibc.git. The next import is scheduled to run in 44 minutes. Last successful import was 5 hours ago. Import started 5 hours ago on juju-98ee42-prod-launchpad-codeimport-18 and finished 5 hours ago taking 5 minutes — see the log
🌐
GitHub
github.com › lattera › glibc
GitHub - lattera/glibc: GNU Libc - Extremely old repo used for research purposes years ago. Please do not rely on this repo. · GitHub
GNU Libc - Extremely old repo used for research purposes years ago. Please do not rely on this repo. - lattera/glibc
Starred by 2K users
Forked by 962 users
Languages   C 65.8% | Assembly 14.2% | C++ 9.4% | Objective-C 4.4% | Roff 3.4% | Makefile 0.8%
Top answer
1 of 4
27

Most linuxes use a libc version named glibc.

The LXR (online cross-reference system) for glibc is e.g. here http://koala.cs.pub.ro/lxr/glibc/ for 2.9 version (link is broken). I must say that something may be not lxr'ed because some sources are generated in the build process, for example - as i can remember - wrappers around a system calls.

Pthreads are in nptl/ folder. Right link to libc sources is http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.bz2 (or change 2.14 to your version)

Update: After closing of koala's lxr, there are:

  1. Metager with glibc: http://code.metager.de/source/xref/gnu/glibc/ (Served with Sun's OpenGrok, which was originally used to generate online x-ref for Solaris/OpenSolaris)

  2. Google code search (I know that it was closed; but I also know it's other version which is up): http://code.google.com/codesearch and try to search something glibc-specific

UPD (march 2013) They killed codesearch again:

404. That’s an error.

The requested URL /codesearch was not found on this server. That’s all we know.

UPD 2017

  1. Metager with glibc: http://code.metager.de/source/xref/gnu/glibc/

  2. There is online git by glibc authors: https://sourceware.org/git/?p=glibc.git (tree is browserable at https://sourceware.org/git/?p=glibc.git;a=tree)

  3. Glibc git is mirrored to github (which has some searching functions) https://github.com/bminor/glibc Buildroot 2018.05 notably uses this mirror.

  4. There is search like google's codesearch in all debian packages: https://codesearch.debian.net/. It can search in glibc sources by "package:glibc request" request and also have file browser: http://sources.debian.net/src/glibc/

2 of 4
15

Info on the glibc repository: http://sourceware.org/glibc/wiki/GlibcGit

Clone it to get your own copy and search it however you like:

git clone git://sourceware.org/git/glibc.git

I load it up in an IDE project (using whatever preferred IDE) and the code navigation works quite well to let me find what I'm interested in.

Browse the source online http://sourceware.org/git/?p=glibc.git

🌐
GitHub
github.com › driverCzn › Glibc-source-browser
GitHub - driverCzn/Glibc-source-browser: Multi-version glibc source browser based on code.woboq.org 's product.
$ mkdir ~/glibc $ cd !$ $ wget https://raw.githubusercontent.com/driverCzn/Glibc-source-browser/master/build.sh $ ./build.sh <version> #make-threads # e.g. ./build.sh 2.25 9 # open a new window or remember the directory shown as result above $ cd ~ $ git clone https://github.com/woboq/woboq_codebrowser $ cd woboq_codebrowser $ wget https://raw.githubusercontent.com/driverCzn/Glibc-source-browser/master/run.sh # read run.sh before run it!
Author   driverCzn
🌐
GitHub
github.com › lattera › glibc › blob › master › io › write.c
glibc/io/write.c at master · lattera/glibc
February 5, 2022 - GNU Libc - Extremely old repo used for research purposes years ago. Please do not rely on this repo. - glibc/io/write.c at master · lattera/glibc
Author   lattera
Top answer
1 of 1
1

How can I navigate glibc and find the actual implementation for lib functions?

Type the function in the search bar at https://code.woboq.org/userspace/glibc or at https://github.com/bminor/glibc . Navigate the results manually until you find the definition.

If you want to index the project locally, use cscope, ctags, GLOBAL tags or clangd to index the project and then use that tools specific interface to search for the definition.

As an example, try looking up the definition of hidden_def in glibc

Type hidden_def glibc into google. My first hit is woboq.org https://code.woboq.org/userspace/glibc/include/libc-symbols.h.html#550 .

I use firefox. I type ctrl+f and type hidden_def. Type Enter until I find # define hidden_def at https://code.woboq.org/userspace/glibc/include/libc-symbols.h.html#550 .

Then select __hidden_ver1 and type ctrl+c ctrl+f and ctrl+v and search for it. In the web browser. I type enter until I find https://code.woboq.org/userspace/glibc/include/libc-symbols.h.html#540 . __hidden_ver2 is just below on line 542.

For most cases all you need is a browser, google, coboq.org and github.org.

It's a macro taking you to hidden_def1

There are no such macros as you mentioned, at least at the version hosted at woboq.org.

How does anyone follow it?

While IDE is a powerful help, each project is unique and requires different settings, that take time to figure out. Mostly browsing the source code is grep (or faster alternatives, like ag, very useful for big projects like glibc) and going through the result list.

Not only system dependent things, like setjmp

Developers are (shoudl be :) sane people - in most cases a function named setjmp will be in a file named setjmp.c. or setjmp.S. Or in the same directory as setjmp.h. Or inside directory named stdlib or setjmp.

Type setjmp in github search bar. https://github.com/bminor/glibc/search?q=setjmp You see there are multiple definitions for each architecture powerpc s390 etc. But files are all named setjmp. Go back. Type "Go to file" on https://github.com/bminor/glibc . Search for a file named x86/setjmp. There are 3 implementations, the most standard one seems to be https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/setjmp.S .

even portable functions like fprintf

As above, saerch for file named fprintf . You quickly find https://github.com/bminor/glibc/blob/master/stdio-common/fprintf.c .