[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
| 5 | %general-entities; |
---|
| 6 | ]> |
---|
| 7 | |
---|
| 8 | <sect1 id="ch-system-adjusting"> |
---|
| 9 | <?dbhtml filename="adjusting.html"?> |
---|
| 10 | |
---|
| 11 | <title>Adjusting the Toolchain</title> |
---|
| 12 | |
---|
| 13 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 14 | href="../common/adjusting.xml" |
---|
[3f8be484] | 15 | xpointer="xpointer(//*[@os='a'])"/> |
---|
| 16 | |
---|
| 17 | <screen os="c"><userinput>gcc -dumpspecs | \ |
---|
[4a65eaf] | 18 | perl -p -e 's@/tools/lib/ld@/lib/ld@g;' \ |
---|
[3f8be484] | 19 | -e 's@/tools/lib64/ld@/lib64/ld@g;' \ |
---|
| 20 | -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \ |
---|
| 21 | `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen> |
---|
| 22 | |
---|
| 23 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 24 | href="../common/adjusting.xml" |
---|
[3f8be484] | 25 | xpointer="xpointer(//*[@os='d'])"/> |
---|
| 26 | |
---|
[4a65eaf] | 27 | <para os="m1">Note that <filename class="directory">/lib</filename> or |
---|
[3f8be484] | 28 | <filename class="directory">/lib64</filename> is now the prefix |
---|
| 29 | of our dynamic linker.</para> |
---|
| 30 | |
---|
| 31 | <caution> |
---|
| 32 | |
---|
| 33 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 34 | href="../common/adjusting.xml" |
---|
[3f8be484] | 35 | xpointer="xpointer(//*[@os='f'])"/> |
---|
| 36 | |
---|
[4a65eaf] | 37 | <para os="m2">For 32 bit ABI:</para> |
---|
[3f8be484] | 38 | |
---|
[4a65eaf] | 39 | <screen os="m3"><userinput>echo 'main(){}' > dummy.c |
---|
[3f8be484] | 40 | cc ${BUILD32} dummy.c |
---|
| 41 | readelf -l a.out | grep ': /lib'</userinput></screen> |
---|
| 42 | |
---|
| 43 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 44 | href="../common/adjusting.xml" |
---|
[3f8be484] | 45 | xpointer="xpointer(//*[@os='h'])"/> |
---|
| 46 | |
---|
| 47 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 48 | href="../common/adjusting.xml" |
---|
[3f8be484] | 49 | xpointer="xpointer(//*[@os='i'])"/> |
---|
| 50 | |
---|
[4a65eaf] | 51 | <para os="m4">For 64 bit ABI:</para> |
---|
[3f8be484] | 52 | |
---|
[4a65eaf] | 53 | <screen os="m5"><userinput>echo 'main(){}' > dummy.c |
---|
[3f8be484] | 54 | cc ${BUILD64} dummy.c |
---|
| 55 | readelf -l a.out | grep ': /lib'</userinput></screen> |
---|
| 56 | |
---|
| 57 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 58 | href="../common/adjusting.xml" |
---|
[3f8be484] | 59 | xpointer="xpointer(//*[@os='h'])"/> |
---|
| 60 | |
---|
[4a65eaf] | 61 | <screen os="m6"><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> |
---|
[3f8be484] | 62 | |
---|
[4a65eaf] | 63 | <para os="m7">Note that <filename class="directory">/lib</filename> or |
---|
[3f8be484] | 64 | <filename class="directory">/lib64</filename> is now the prefix |
---|
| 65 | of our dynamic linker.</para> |
---|
| 66 | |
---|
| 67 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 68 | href="../common/adjusting.xml" |
---|
[3f8be484] | 69 | xpointer="xpointer(//*[@os='k'])"/> |
---|
| 70 | |
---|
| 71 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 72 | href="../common/adjusting.xml" |
---|
[3f8be484] | 73 | xpointer="xpointer(//*[@os='l'])"/> |
---|
| 74 | |
---|
| 75 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
[4a65eaf] | 76 | href="../common/adjusting.xml" |
---|
[3f8be484] | 77 | xpointer="xpointer(//*[@os='m'])"/> |
---|
| 78 | |
---|
| 79 | </caution> |
---|
| 80 | |
---|
| 81 | </sect1> |
---|