r1162 - trunk/BOOK/chapter05

robert at linuxfromscratch.org robert at linuxfromscratch.org
Sat Jun 16 04:41:04 PDT 2007


Author: robert
Date: 2007-06-16 05:41:03 -0600 (Sat, 16 Jun 2007)
New Revision: 1162

Modified:
   trunk/BOOK/chapter05/adjusting.xml
   trunk/BOOK/chapter05/embryo-toolchain.xml
Log:
Run './a.out && readelf', in chap5 adjusting, to be positive the compile and linking both worked

Modified: trunk/BOOK/chapter05/adjusting.xml
===================================================================
--- trunk/BOOK/chapter05/adjusting.xml	2007-06-14 07:24:52 UTC (rev 1161)
+++ trunk/BOOK/chapter05/adjusting.xml	2007-06-16 11:41:03 UTC (rev 1162)
@@ -109,8 +109,8 @@
 
 <screen><userinput>echo 'int main(){return 0;}' > dummy.c
 cc dummy.c
-readelf -l a.out | grep ': /tools'
-./a.out</userinput></screen>
+./a.out &&
+readelf -l a.out | grep ': /tools'</userinput></screen>
 
     <para>If everything is working correctly, there should be no errors,
     and the output of the last command will be of the form:</para>

Modified: trunk/BOOK/chapter05/embryo-toolchain.xml
===================================================================
--- trunk/BOOK/chapter05/embryo-toolchain.xml	2007-06-14 07:24:52 UTC (rev 1161)
+++ trunk/BOOK/chapter05/embryo-toolchain.xml	2007-06-16 11:41:03 UTC (rev 1162)
@@ -71,6 +71,10 @@
     toolchain which can in turn build a purely PIC final system. Add
     <option>-fPIC</option> to the GCC specs file with the following command:</para>
 
+<!-- Note: -fPIC is also needed here so that libssp.a will be pic when used
+with uClibc to build the next toolchain. Otherwise 'gcc -lssp -pie' = TEXTREL.
+-->
+
 <screen role="aslr"><userinput>cp -vi gcc/config/i386/linux.h{,.orig}
 sed 's/^\(#define CC1_SPEC.*\)\("\)$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
     gcc/config/i386/linux.h.orig > gcc/config/i386/linux.h</userinput></screen>




More information about the hlfs-book mailing list