- Timestamp:
- 02/11/2002 12:12:38 PM (23 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v3_2, v3_3, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 7ecaaca
- Parents:
- 901193ca
- Location:
- chapter05
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/installasuser.xml
r901193ca rfe57863 10 10 cause all kinds of problems, so it's a good idea to be logged in as 11 11 an unprivileged user during chapter 5. To make sure the environment 12 is as clean as possible, we'll create a new user lfsthat can be12 is as clean as possible, we'll create a new user "lfs" that can be 13 13 used while building the static installation. Issuing the following 14 14 commands as root will create a new user "lfs":</para> … … 46 46 <para>When your host distribution uses a glibc version older than 2.2.4, 47 47 having $LC_ALL set to something else than "C" or "POSIX" while working 48 through chapter 5 may cause trouble when you 've exited the chrooted49 environment of chapter 6 and try to return to it. By setting this to 50 "POSIX" ("C" is an alias for "POSIX") we ensure that everything will 51 work as expected in the chrootedenvironment.</para>48 through chapter 5 may cause trouble when you exit the chroot environment 49 of chapter 6 and try to return to it. By setting this to "POSIX" ("C" 50 is an alias for "POSIX") we ensure that everything will work as expected 51 in the chroot environment.</para> 52 52 53 53 </sect1> -
chapter05/whystatic.xml
r901193ca rfe57863 9 9 functions for dealing with the kernel, hardware, files, etc. every time you 10 10 write a new program, all these basic functions are instead kept in libraries. 11 glibc, which you install later, is one of these major libraries, which contain12 co de for all the basic functions programs use, like opening files, printing13 information on the screen, and getting feedback from the user. When the 14 program is compiled, these libraries of code are linked together with the new 15 program, so that it can use any of the functions that the library11 glibc, which you install later, is one of these major libraries, which 12 contains code for all the basic functions programs use, like opening files, 13 printing information on the screen, and getting feedback from the user. When 14 the program is compiled, these libraries of code are linked together with the 15 new program, so that it can use any of the functions that the library 16 16 has.</para> 17 17 18 <para>However, these libraries can be very large (for example, libc.a 19 from can often be around 2.5MB), so you may not want a separate copy of 20 each library attached to the 21 program. Just imagine if you had a simple command like ls with an extra 2.5MB 22 attached to it! Instead of making the library an actual part of the 23 program, or Statically Linked, the library is kept a separate file, 24 which is loaded only when the program needs it. This is what we call Dynamically 25 Linked, as the library is loaded and unloaded dynamically, as the program needs 26 it.</para> 18 <para>However, these libraries can be very large (for example, libc.a from 19 can often be around 2.5MB), so you may not want a separate copy of each 20 library attached to the program. Just imagine if you had a simple command 21 like ls with an extra 2.5MB attached to it! Instead of making the library 22 an actual part of the program, or statically linked, the library is kept a 23 separate file, which is loaded only when the program needs it. This is what 24 we call dynamically linked, as the library is loaded and unloaded dynamically, 25 as the program needs it.</para> 27 26 28 27 <para>So now we have a 1kb file and a 2.5MB file, but we still haven't saved any
Note:
See TracChangeset
for help on using the changeset viewer.