adjusting.po 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-24 15:59+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:11
  15. msgid "Adjusting the Toolchain"
  16. msgstr "调整工具链"
  17. #. type: Content of: <sect1><para>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:13
  19. msgid ""
  20. "Now that the final C libraries have been installed, it is time to adjust the "
  21. "toolchain so that it will link any newly compiled program against these new "
  22. "libraries."
  23. msgstr ""
  24. "现在最终的 C 运行库已经安装好了,这时就要调整工具链,以便将新编译的任何程序"
  25. "都链接到新的 C 运行库。"
  26. #. type: Content of: <sect1><para>
  27. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:17
  28. msgid ""
  29. "First, backup the <filename class=\"directory\">/tools</filename> linker, "
  30. "and replace it with the adjusted linker we made in chapter 5. We'll also "
  31. "create a link to its counterpart in <filename class=\"directory\">/tools/"
  32. "$(uname -m)-pc-linux-gnu/bin</filename>:"
  33. msgstr ""
  34. "首先,备份 <filename class=\"directory\">/tools</filename> 中的链接器,把它替"
  35. "换成第 5 章准备的调整好的链接器。我们也会把 <filename class=\"directory\">/"
  36. "tools/$(uname -m)-pc-linux-gnu/bin</filename> 中对应的链接器替换成一个符号链"
  37. "接:"
  38. #. type: Content of: <sect1><screen>
  39. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:22
  40. #, no-wrap
  41. msgid ""
  42. "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
  43. "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
  44. "mv -v /tools/bin/{ld-new,ld}\n"
  45. "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
  46. msgstr ""
  47. "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
  48. "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
  49. "mv -v /tools/bin/{ld-new,ld}\n"
  50. "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
  51. #. type: Content of: <sect1><para>
  52. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:27
  53. msgid ""
  54. "the next command amends the GCC specs file to achieve three goals: first "
  55. "point GCC to the new dynamic linker. Simply deleting all instances of "
  56. "<quote>/tools</quote> should leave us with the correct path to the dynamic "
  57. "linker. Second, let GCC know where to find the Glibc start files. Third, add "
  58. "the /usr/include directory at the end of the default search path, so that "
  59. "header files added in chapter 6 are found. A <command>sed</command> command "
  60. "accomplishes this:"
  61. msgstr ""
  62. "下面修改 GCC 的 specs 文件,使其指向新的动态链接器。把所有的 <quote>/tools</"
  63. "quote> 删除掉就会留下正确的路径。另外,调整 specs 文件,使得 GCC 知道去哪里"
  64. "寻找正确的头文件和 Glibc 启动文件。最后,在默认搜索路径之后加入 /usr/include 目录。一个 <command>sed</command> 命令即可完成以"
  65. "上工作:"
  66. #. type: Content of: <sect1><screen>
  67. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:35
  68. #, no-wrap
  69. msgid ""
  70. "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
  71. " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
  72. " -e '/\\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt; \\\n"
  73. " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
  74. msgstr ""
  75. "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
  76. " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
  77. " -e '/\\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt; \\\n"
  78. " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
  79. #. type: Content of: <sect1><para>
  80. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:40
  81. msgid ""
  82. "It is a good idea to visually inspect the specs file to verify the intended "
  83. "change was actually made."
  84. msgstr "这时最好浏览一下生成的 specs 文件,以确认确实进行了我们期望的修改。"
  85. #. type: Content of: <sect1><para>
  86. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:43
  87. msgid ""
  88. "It is imperative at this point to ensure that the basic functions (compiling "
  89. "and linking) of the adjusted toolchain are working as expected. To do this, "
  90. "perform the following sanity checks:"
  91. msgstr ""
  92. "现在的当务之急是保证调整过的工具链的基本功能(编译和链接) 能够像我们期望的那"
  93. "样工作。为此,进行下列完整性检查:"
  94. #. type: Content of: <sect1><screen>
  95. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:47
  96. #, no-wrap
  97. msgid ""
  98. "<userinput>echo 'int main(){}' &gt; dummy.c\n"
  99. "cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log\n"
  100. "readelf -l a.out | grep ': /lib'</userinput>"
  101. msgstr ""
  102. "<userinput>echo 'int main(){}' &gt; dummy.c\n"
  103. "cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log\n"
  104. "readelf -l a.out | grep ': /lib'</userinput>"
  105. #. type: Content of: <sect1><para>
  106. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:51
  107. msgid ""
  108. "There should be no errors, and the output of the last command will be "
  109. "(allowing for platform-specific differences in the dynamic linker name):"
  110. msgstr ""
  111. "上述命令不应该出现错误,最后一行命令输出的结果应该 (不同平台的动态链接器名称"
  112. "可能不同) 是:"
  113. #. type: Content of: <sect1><screen>
  114. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:55
  115. #, no-wrap
  116. msgid "<computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput>"
  117. msgstr "<computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput>"
  118. #. type: Content of: <sect1><para>
  119. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:57
  120. msgid ""
  121. "Note that on 64-bit systems <filename class=\"directory\">/lib</filename> is "
  122. "the location of our dynamic linker, but is accessed via a symbolic link in /"
  123. "lib64."
  124. msgstr ""
  125. "注意在 64 位系统上 <filename class=\"directory\">/lib</filename> 是动态链接器"
  126. "的位置,但通过 /lib64 中的符号链接访问。"
  127. #. type: Content of: <sect1><note><para>
  128. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:61
  129. msgid "On 32-bit systems the interpreter should be /lib/ld-linux.so.2."
  130. msgstr "在 32 位系统上,解释器是 /lib/ld-linux.so.2。"
  131. #. type: Content of: <sect1><para>
  132. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:64
  133. msgid "Now make sure that we're setup to use the correct start files:"
  134. msgstr "下面确认我们的设定能够使用正确的启动文件:"
  135. #. type: Content of: <sect1><screen>
  136. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:66
  137. #, no-wrap
  138. msgid "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
  139. msgstr "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
  140. #. type: Content of: <sect1><para>
  141. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:68
  142. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:103
  143. msgid "The output of the last command should be:"
  144. msgstr "以上命令应该输出:"
  145. #. type: Content of: <sect1><screen>
  146. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:70
  147. #, no-wrap
  148. msgid ""
  149. "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
  150. "/usr/lib/../lib/crti.o succeeded\n"
  151. "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
  152. msgstr ""
  153. "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
  154. "/usr/lib/../lib/crti.o succeeded\n"
  155. "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
  156. #. type: Content of: <sect1><para>
  157. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:74
  158. msgid "Verify that the compiler is searching for the correct header files:"
  159. msgstr "确认编译器能正确查找头文件:"
  160. #. type: Content of: <sect1><screen>
  161. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:77
  162. #, no-wrap
  163. msgid "<userinput>grep -B4 '^ /usr/include' dummy.log</userinput>"
  164. msgstr "<userinput>grep -B4 '^ /usr/include' dummy.log</userinput>"
  165. #. type: Content of: <sect1><para>
  166. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:79
  167. msgid "This command should return the following output:"
  168. msgstr "该命令应当输出:"
  169. #. type: Content of: <sect1><screen>
  170. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:81
  171. #, no-wrap
  172. msgid ""
  173. "<computeroutput>#include &lt;...&gt; search starts here:\n"
  174. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include\n"
  175. " /tools/include\n"
  176. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed\n"
  177. " /usr/include</computeroutput>"
  178. msgstr ""
  179. "<computeroutput>#include &lt;...&gt; search starts here:\n"
  180. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include\n"
  181. " /tools/include\n"
  182. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed\n"
  183. " /usr/include</computeroutput>"
  184. #. type: Content of: <sect1><note><para>
  185. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:87
  186. msgid "On a 32 bit system, x86_64 is replaced with i686."
  187. msgstr "在 32 位系统上,应该将 x86_64 替换成 i686。"
  188. #. type: Content of: <sect1><para>
  189. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:89
  190. msgid ""
  191. "Next, verify that the new linker is being used with the correct search paths:"
  192. msgstr "下一步确认新的链接器使用了正确的搜索路径:"
  193. #. type: Content of: <sect1><screen>
  194. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:91
  195. #, no-wrap
  196. msgid "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
  197. msgstr "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
  198. #. type: Content of: <sect1><para>
  199. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:93
  200. msgid ""
  201. "References to paths that have components with '-linux-gnu' should be "
  202. "ignored, but otherwise the output of the last command should be:"
  203. msgstr "那些包含 '-linux-gnu' 的路径应该忽略,除此之外,以上命令应该输出:"
  204. #. type: Content of: <sect1><screen>
  205. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:96
  206. #, no-wrap
  207. msgid ""
  208. "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
  209. "SEARCH_DIR(\"/lib\")</computeroutput>"
  210. msgstr ""
  211. "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
  212. "SEARCH_DIR(\"/lib\")</computeroutput>"
  213. #. type: Content of: <sect1><para>
  214. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:99
  215. msgid "Next make sure that we're using the correct libc:"
  216. msgstr "之后确认我们使用了正确的 libc:"
  217. #. type: Content of: <sect1><screen>
  218. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:101
  219. #, no-wrap
  220. msgid "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
  221. msgstr "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
  222. #. type: Content of: <sect1><screen>
  223. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:105
  224. #, no-wrap
  225. msgid "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
  226. msgstr "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
  227. #. type: Content of: <sect1><para>
  228. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:107
  229. msgid "Make sure GCC is using the correct dynamic linker:"
  230. msgstr "确认 GCC 使用了正确的动态链接器:"
  231. #. type: Content of: <sect1><screen>
  232. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:109
  233. #, no-wrap
  234. msgid "<userinput>grep found dummy.log</userinput>"
  235. msgstr "<userinput>grep found dummy.log</userinput>"
  236. #. type: Content of: <sect1><para>
  237. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:111
  238. msgid ""
  239. "The output of the last command should be (allowing for platform-specific "
  240. "differences in dynamic linker name):"
  241. msgstr "以上命令应该输出(不同平台的动态链接器名称可能不同):"
  242. #. type: Content of: <sect1><screen>
  243. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:114
  244. #, no-wrap
  245. msgid "<computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput>"
  246. msgstr "<computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput>"
  247. #. The most likely
  248. #. reason is that something went wrong with the specs file adjustment.
  249. #. type: Content of: <sect1><para>
  250. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:116
  251. msgid ""
  252. "If the output does not appear as shown above or is not received at all, then "
  253. "something is seriously wrong. Investigate and retrace the steps to find out "
  254. "where the problem is and correct it. Any issues will need to be resolved "
  255. "before continuing with the process."
  256. msgstr ""
  257. "如果输出和以上描述不符,或者根本没有输出,那么必然有什么地方出了严重错误。检"
  258. "查并重新跟踪以上步骤,找到问题的原因,并修复它。这里出现的任何问题在继续构建前都必须解决。"
  259. #. type: Content of: <sect1><para>
  260. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:122
  261. msgid "Once everything is working correctly, clean up the test files:"
  262. msgstr "在确认一切工作良好后,删除测试文件:"
  263. #. type: Content of: <sect1><screen>
  264. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:124
  265. #, no-wrap
  266. msgid "<userinput>rm -v dummy.c a.out dummy.log</userinput>"
  267. msgstr "<userinput>rm -v dummy.c a.out dummy.log</userinput>"