Changeset da2f9fe for chapter05


Ignore:
Timestamp:
08/07/2007 08:24:04 PM (17 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
Children:
71f6077
Parents:
400af5a8
Message:
  • Upgraded to HJL Binutils-2.17.50.0.18
  • Initial update of commands to work with both x86 and x86_64

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/jh/BOOK@8282 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter05
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter05/adjusting.xml

    r400af5a8 rda2f9fe  
    3737  <para>For the sake of accuracy, it is recommended to use a copy-and-paste
    3838  method when issuing the following command. Be sure to visually inspect the
    39   specs file and verify that all occurrences of <quote>/lib64/ld-linux-x86-64.so.2</quote>
    40   have been replaced with <quote>/tools/lib64/ld-linux-x86-64.so.2</quote>:</para>
     39  specs file and verify that all occurrences of <quote>/lib/ld-linux.so.2</quote>
     40  have been replaced with <quote>/tools/lib/ld-linux.so.2</quote>:</para>
    4141
    4242  <important>
    4343    <para>If working on a platform where the name of the dynamic linker is
    44     something other than <filename class="libraryfile">ld-linux-x86-64.so.2</filename>,
    45     replace <quote>ld-linux-x86-64.so.2</quote> with the name of the platform's
     44    something other than <filename class="libraryfile">ld-linux.so.2</filename>,
     45    replace <quote>ld-linux.so.2</quote> with the name of the platform's
    4646    dynamic linker in the following commands. Refer to <xref
    47     linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
     47    linkend="ch-tools-toolchaintechnotes" role=","/> if necessary. Additionally,
     48    note that on 64-bit machines the linker may actually be expected in the
     49    <filename class="directory">/lib64</filename> directory.</para>
    4850  </important>
    4951
    5052<!-- Ampersands are needed to allow copy and paste -->
    51 <screen><userinput>gcc -dumpspecs | sed 's@/lib64/ld-linux-x86-64.so.2@/tools&amp;@g' \
    52   > `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
     53<screen><userinput>gcc -dumpspecs | sed 's@/lib\(64\)\?/ld@/tools&amp;@g' \
     54  &gt; `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
    5355
    5456  <para>During the build process, GCC runs a script
     
    8587
    8688<screen><computeroutput>[Requesting program interpreter:
    87     /tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     89    /tools/lib/ld-linux.so.2]</computeroutput></screen>
    8890
    89     <para>Note that <filename class="directory">/tools/lib</filename>
     91    <para>Note that <filename class="directory">/tools/lib</filename>, or
     92    <filename class="directory">/tools/lib64</filename> for 64-bit machines
    9093    appears as the prefix of the dynamic linker.</para>
    9194
  • chapter05/toolchaintechnotes.xml

    r400af5a8 rda2f9fe  
    2828  <important>
    2929    <para>Before continuing, be aware of the name of the working platform,
    30     often referred to as the target triplet. Many times, the target
    31     triplet will probably be <emphasis>x86_64-unknown-linux-gnu</emphasis>. A
    32     simple way to determine the name of the target triplet is to run the
    33     <command>config.guess</command> script that comes with the source for
    34     many packages. Unpack the Binutils sources and run the script:
    35     <userinput>./config.guess</userinput> and note the output.</para>
     30    often referred to as the target triplet. A simple way to determine the
     31    name of the target triplet is to run the <command>config.guess</command>
     32    script that comes with the source for many packages. Unpack the Binutils
     33    sources and run the script: <userinput>./config.guess</userinput> and note
     34    the output. For example, for a modern 32-bit Intel processor the
     35    output will likely be <emphasis>i686-pc-linux-gnu</emphasis>.</para>
    3636
    3737    <para>Also be aware of the name of the platform's dynamic linker, often
     
    4040    provided by Glibc finds and loads the shared libraries needed by a program,
    4141    prepares the program to run, and then runs it. The name of the dynamic
    42     linker will usually be <filename class="libraryfile">ld-linux-x86-64.so.2</filename>.
    43     The name of the platform's dynamic linker can be determined by looking in the
    44     <filename class="directory">/lib</filename>
    45     directory on the host system. A sure-fire way to determine the name is to
     42    linker for a 32-bit Intel machine will be
     43    <filename class="libraryfile">ld-linux.so.2</filename>.
     44    A sure-fire way to determine the name of the dynamic linker is to
    4645    inspect a random binary from the host system by running:
    4746    <userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>
     
    9796
    9897<screen><computeroutput>checking what assembler to use...
    99         /tools/x86_64-unknown-linux-gnu/bin/as
    100 checking what linker to use... /tools/x86_64-unknown-linux-gnu/bin/ld</computeroutput></screen>
     98        /tools/i686-pc-linux-gnu/bin/as
     99checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen>
    101100
    102101  <para>This is important for the reasons mentioned above. It also demonstrates
Note: See TracChangeset for help on using the changeset viewer.