CSAPP, lab experimental environment ubuntu construction

CSAPP is really an excellent course, which gave me a deeper understanding of the principles of computer composition. The experiments they provided are also very interesting. After a long time of consulting information and testing, the experiment was finally completed. Record and share with those in need

ubuntu20.04.1 virtual machine image and related experimental files: Baidu network disk , extraction code: nwfw


1. Download "Pocc.tar.gz" in the network disk , and transfer the file to the virtual machine (if you don't know how to use the virtual machine, please move to another blog of the blogger to download and install the VMware virtual machine , and put the windows The image file is replaced with the ubuntu image in the network disk)

2. Unzip the "Pocc.tar.gz" file and enter the "Pocc/01 data lab/datalab-handout" folder

3. Enter the "make" command, prompting that we have not installed make

make

Then we install  "make" and enter make after installation

sudo apt -y install make

4. Enter the "./btset" command, prompting that we have not installed gcc

./btest

Then we install  "gcc" and enter "./btest" after installation

sudo apt install gcc -y

5. Since the experiment is relatively old and runs on a 32-bit system, this error will occur. Next, we will build a 32-bit environment

sudo apt-get install gcc-multilib

6. Execute the following three commands successively, and you need to re-execute these three commands before each test run

make clean
make
./btest

The appearance of this page means that the environment has been built. The experimental code of 01datalab is in the "bits.c" file. After modification, run the test

Guess you like

Origin blog.csdn.net/qq_21891843/article/details/122637800