s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
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 |