|
Next
Previous
Contents
5. The GNU C LibraryThe next thing that happens as your computer starts up is that init is loaded and run. However, init, like almost all programs, uses functions from libraries.
You may have seen an example C program like this:
main() {
printf("Hello World!\n");
}
The program contains no definition of
If you look in
There are two ways programs can use these library functions. If you statically
link a program, these library functions are copied into the executable that gets
created. This is what the
The command
[greg@Curry power2bash]$ ldd /bin/bash
libtermcap.so.2 => /lib/libtermcap.so.2 (0x40019000)
libc.so.6 => /lib/libc.so.6 (0x4001d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
5.1 ConfigurationSome of the functions in the libraries depend on where you are. For example, in Australia we write dates as dd/mm/yy, but Americans write mm/dd/yy. There is a program that comes with the
5.2 ExercisesUse
Use
Make a toy library, with just one or two functions in it. The program
5.3 More Information
Next Previous Contents Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |