As you’ll find out reading this book, nearly everything in an embedded Linux system is fair game for some sort of substitution—even things you take for granted. One such item that most engineers use frequently but never give much consideration to is the implementation of the standard C library. The C language contains about 30 keywords (depending on the implementation of C), and the balance of the language’s functionality is supplied by the standard library.4 This bit of design genius means that C can be easily implemented on a new platform by creating a minimal compiler and using that to compile the standard library to produce something sufficient for application development. The separation between the core language and the library also means there can be several implementations. That fact inhibited the adoption of C for a while, because each compiler maker shipped a C standard library that differed from their competitors’, meaning a complex project needed tweaking (or major rework) in order to be used with a different compiler. In the case of Linux, several small library implementations exist, with uClibc being the most common. uClibc is smaller because it was written with size in mind and doesn’t have the platform support of glibc; it’s also missing some other features. Most of what’s been removed has no effect on an embedded system.
Source of Information : Pro Linux Embedded Systems (December 2009)
No comments:
Post a Comment