1
0

strippingagain.xml.rej 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- chapter06/strippingagain.xml
  2. +++ chapter06/strippingagain.xml
  3. @@ -67,33 +67,15 @@ done
  4. unset LIB save_lib save_usrlib</userinput></screen>
  5. - <!--para>Before performing the stripping, take special care to ensure that
  6. - none of the binaries that are about to be stripped are running. If
  7. - unsure whether the user entered chroot with the command given in
  8. - <xref linkend="ch-system-chroot" role=","/> first exit from
  9. - chroot:</para-->
  10. <para>在移除调试符号前,必须特别小心,
  11. - 保证没有需要移除调试符号的二进制程序还在运行。
  12. - 如果不确定是否使用 <xref linkend="ch-system-chroot"/>
  13. - 中的命令进入了 chroot 环境,首先退出 chroot 环境:</para>
  14. -
  15. -<screen role="nodump"><userinput>logout</userinput></screen>
  16. -
  17. - <para>然后再执行下列命令重新进入:</para>
  18. -
  19. -<screen role="nodump"><userinput>chroot $LFS /tools/bin/env -i \
  20. - HOME=/root TERM=$TERM \
  21. - PS1='(lfs chroot) \u:\w\$ ' \
  22. - PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  23. - /tools/bin/bash --login</userinput></screen>
  24. + 保证没有需要移除调试符号的二进制程序还在运行:</para>
  25. +<screen role="nodump"><userinput>exec /tools/bin/bash</userinput></screen>
  26. +
  27. <note><title>译注</title>
  28. - <para>注意这里使用了 /tools/bin/bash 而不是 /bin/bash ,
  29. - 因为 /bin 中的 bash 二进制文件将会被移除调试符号。
  30. - 在 <xref linkend="ch-system-bash"/> 中我们执行了新编译的
  31. - /bin/bash ,因此必须退出 chroot 环境,再以 /tools/bin/bash
  32. - 为 shell 重新进入。之后使用的 /tools/bin/find 和
  33. - /tools/bin/strip 同理。</para>
  34. + <para>注意这里使用 /tools/bin/bash 代替当前运行的 /bin/bash ,
  35. + 因为 /bin/bash 二进制文件将会被移除调试符号。
  36. + 之后使用的 /tools/bin/find 和 /tools/bin/strip 同理。</para>
  37. </note>
  38. <para>现在即可安全地移除程序和库的调试符号:</para>