aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-09-14 00:03:45 +0800
committerXi Ruoyao <xry111@xry111.site>2022-09-14 00:03:45 +0800
commit0d487e09e603e7a86fdec911d9b0b4d53c4f1ac5 (patch)
tree2ad978e8b6c53cfa1d6239da5c988b6e5b12aca3 /chapter08
parentfb5ad925884a5740da2f9f525570966d11f61054 (diff)
gcc: update sanity check command and output for default PIE
Scrt1.o is used for PIE, instead of crt1.o.
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/gcc.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 65f502dde..c5c446e9a 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -227,11 +227,11 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
<para>Now make sure that we're setup to use the correct start files:</para>
-<screen><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen>
+<screen><userinput>grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log</userinput></screen>
<para>The output of the last command should be:</para>
-<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
+<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>