From 3577b41b3e8a4363f8f1eef430a695e105cdc5e9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 3 Jan 2024 13:46:20 +0800 Subject: [PATCH] mips64el: gcc: update sanity check output --- chapter08/gcc.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 5ef8d0814..2ed45619d 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -235,7 +235,7 @@ readelf -l a.out | grep ': /lib' and the output of the last command will be (allowing for platform-specific differences in the dynamic linker name): -[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] +[Requesting program interpreter: /lib64/ld.so.1] Now make sure that we're set up to use the correct start files: @@ -243,9 +243,9 @@ readelf -l a.out | grep ': /lib' The output of the last command should be: -/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 +/usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/Scrt1.o succeeded +/usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crti.o succeeded +/usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crtn.o succeeded Depending on your machine architecture, the above may differ slightly. The difference will be the name of the directory @@ -262,9 +262,9 @@ readelf -l a.out | grep ': /lib' This command should return the following output: #include <...> search starts here: - /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include + /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include /usr/local/include - /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed + /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include-fixed /usr/include Again, the directory named after your target triplet may be @@ -277,15 +277,15 @@ readelf -l a.out | grep ': /lib' References to paths that have components with '-linux-gnu' should be ignored, but otherwise the output of the last command should be: -SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64") +SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib64") SEARCH_DIR("/usr/local/lib64") SEARCH_DIR("/lib64") SEARCH_DIR("/usr/lib64") -SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib") +SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib") SEARCH_DIR("/usr/local/lib") SEARCH_DIR("/lib") SEARCH_DIR("/usr/lib"); - + Next make sure that we're using the correct libc: grep "/lib.*/libc.so.6 " dummy.log @@ -313,7 +313,7 @@ SEARCH_DIR("/usr/lib"); The output of the last command should be (allowing for platform-specific differences in dynamic linker name): -found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2 +found ld.so.1 at /usr/lib/ld.so.1 If the output does not appear as shown above or is not received at all, then something is seriously wrong. Investigate and retrace the