msgid "" msgstr "" "X-Pootle-Revision: 9999999\n" "X-Pootle-Path: /zh_CN/lfs/chapter08/strippingagain.po\n" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2020-08-08 19:28+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Translate Toolkit 2.2.5\n" #. type: Content of: msgid "Stripping Again" msgstr "再次移除调试符号" #. type: Content of: <sect1><para> msgid "" "This section is optional. If the intended user is not a programmer and does " "not plan to do any debugging on the system software, the system size can be " "decreased by about 2 GB by removing the debugging symbols from binaries and " "libraries. This causes no inconvenience other than not being able to debug " "the software fully anymore." msgstr "" "本节是可选的。如果系统不是为程序员设计的,也没有调试系统软件的计划,可以通过" "从二进制程序和库移除调试符号,将系统的体积减小约 2 GB。除了无法再调试全部软件" "外,这不会造成任何不便。" #. type: Content of: <sect1><para> msgid "" "Most people who use the commands mentioned below do not experience any " "difficulties. However, it is easy to make a typo and render the new system " "unusable, so before running the <command>strip</command> commands, it is a " "good idea to make a backup of the LFS system in its current state." msgstr "" "大多数使用以下命令的用户不会遇到什么困难。但是,如果打错了命令,很容易导致新" "系统无法使用,因此在运行 <command>strip</command> 命令前,最好备份 LFS 系统的" "当前状态。" #. type: Content of: <sect1><para> msgid "" "First place the debugging symbols for selected libraries in separate files. " "This debugging information is needed if running regression tests that use " "<ulink url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink " "url='&blfs-book;/general/gdb.html'>gdb</ulink> later in BLFS." msgstr "" "首先将一些库的调试符号保存在单独的文件中。之后在 BLFS 中,如果使用 <ulink " "url='&blfs-book;/general/valgrind.html'>valgrind</ulink> 或 <ulink " "url='&blfs-book;/general/gdb.html'>gdb</ulink> 运行退化测试,则需要这些调试信" "息的存在。" #. also of interest are libgfortan, libgo, libgomp, and libobjc from GCC #. <screen> #. <userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so" #. libcilkrts.so.&libcilkrts-version; #. type: Content of: <sect1><screen> #, no-wrap msgid "" "<userinput>save_lib=\"ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so\"\n" "\n" "cd /lib\n" "\n" "for LIB in $save_lib; do\n" " objcopy --only-keep-debug $LIB $LIB.dbg \n" " strip --strip-unneeded $LIB\n" " objcopy --add-gnu-debuglink=$LIB.dbg $LIB \n" "done \n" "\n" "save_usrlib=\"libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;\n" " libitm.so.&libitm-version; libatomic.so.&libatomic-version;\" \n" "\n" "cd /usr/lib\n" "\n" "for LIB in $save_usrlib; do\n" " objcopy --only-keep-debug $LIB $LIB.dbg\n" " strip --strip-unneeded $LIB\n" " objcopy --add-gnu-debuglink=$LIB.dbg $LIB\n" "done\n" "\n" "unset LIB save_lib save_usrlib</userinput>" msgstr "" "<userinput>save_lib=\"ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so\"\n" "\n" "cd /lib\n" "\n" "for LIB in $save_lib; do\n" " objcopy --only-keep-debug $LIB $LIB.dbg \n" " strip --strip-unneeded $LIB\n" " objcopy --add-gnu-debuglink=$LIB.dbg $LIB \n" "done \n" "\n" "save_usrlib=\"libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;\n" " libitm.so.&libitm-version; libatomic.so.&libatomic-version;\" \n" "\n" "cd /usr/lib\n" "\n" "for LIB in $save_usrlib; do\n" " objcopy --only-keep-debug $LIB $LIB.dbg\n" " strip --strip-unneeded $LIB\n" " objcopy --add-gnu-debuglink=$LIB.dbg $LIB\n" "done\n" "\n" "unset LIB save_lib save_usrlib</userinput>" #. type: Content of: <sect1><para> msgid "Now the binaries and libraries can be stripped:" msgstr "现在即可移除程序和库的调试符号:" #. type: Content of: <sect1><screen> #, no-wrap msgid "" "<userinput>find /usr/lib -type f -name \\*.a \\\n" " -exec strip --strip-debug {} ';'\n" "\n" "find /lib /usr/lib -type f -name \\*.so* ! -name \\*dbg \\\n" " -exec strip --strip-unneeded {} ';'\n" "\n" "find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \\\n" " -exec strip --strip-all {} ';'</userinput>" msgstr "" "<userinput>find /usr/lib -type f -name \\*.a \\\n" " -exec strip --strip-debug {} ';'\n" "\n" "find /lib /usr/lib -type f -name \\*.so* ! -name \\*dbg \\\n" " -exec strip --strip-unneeded {} ';'\n" "\n" "find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \\\n" " -exec strip --strip-all {} ';'</userinput>" #. type: Content of: <sect1><para> msgid "" "A large number of files will be reported as having their file format not " "recognized. These warnings can be safely ignored. These warnings indicate " "that those files are scripts instead of binaries." msgstr "" "这里会有很多文件被报告为格式无法识别。这些警告可以安全地忽略。它们表明那些文" "件是脚本文件,而不是二进制文件。"