- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
How can you tell if your embedded Linux system is running uClibc or glibc? If you use Buildroot to build your embedded Linux system, this is the default choice. You can choose other toolchains/libraries, but once chosen, how can you tell at runtime what library you are using? Here are a couple of ways.
First, run glibc the command line. It will report a bunch of information about itself:
# /lib/libc.so.6
GNU C Library (Sourcery G++ Lite 2011.03-41) stable release version 2.13, by Rol
and McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-15.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
Support for some architectures added on, not maintained in glibc core.
BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
In a uClibc system, attempting to run the /lib/libc.so.0 (uClibc library file) in the same way results in a segfault:
# ./libc.so.0
Segmentation fault
Another way to tell would be to look in the files in /lib.
uClibc is usually installed in /lib/libuClibc-<version number>.so
and there is a link to it in /lib/libc.so.0
Glibc is in /lib/libc-<version number>.so
and there is a link to it in /lib/libc.so.6.
This work was done on an Atmel AT91SAM9x35 EK using their Buildroot-based implementation.
How to build Buildroot for the SAM9X35 EK:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/B
More information on uClibc:





You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet, please register and log in.