update related_info
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
all: write
|
||||
all: lab1-ex0.exe lab1-ex1.exe
|
||||
|
||||
write: defines.h write.s
|
||||
gcc -o write write.s
|
||||
lab1-ex0.exe: defines.h lab1-ex0.s
|
||||
gcc -g -o lab1-ex0.exe lab1-ex0.s
|
||||
|
||||
lab1-ex1.exe: lab1-ex1.c
|
||||
echo "compile and watch the syscalls from lab1-ex1"
|
||||
gcc -o lab1-ex1.exe lab1-ex1.c
|
||||
strace -c ./lab1-ex1.exe
|
||||
echo "watch the interrupts in linux"
|
||||
more /proc/interrupts
|
||||
|
||||
clean:
|
||||
rm write write.o
|
||||
rm lab1-ex0.exe lab1-ex1.exe
|
||||
|
||||
15
related_info/lab1/lab1-ex0.md
Normal file
15
related_info/lab1/lab1-ex0.md
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
Try below command
|
||||
```
|
||||
gcc -g -o lab1-ex0.exe lab1-ex0.s
|
||||
```
|
||||
Then you will get lab1_ex0.exe
|
||||
|
||||
Try to use below some tools to analysis lab1_ex0.exe
|
||||
```
|
||||
objdump
|
||||
nm
|
||||
file
|
||||
|
||||
```
|
||||
Try to understand the contents of this .s file.
|
||||
5
related_info/lab1/lab1-ex1.c
Normal file
5
related_info/lab1/lab1-ex1.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
void main(void)
|
||||
{
|
||||
printf("hello world\n");
|
||||
}
|
||||
12
related_info/lab1/lab1-ex1.md
Normal file
12
related_info/lab1/lab1-ex1.md
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
Try below command
|
||||
|
||||
```
|
||||
echo "compile and watch the syscalls from lab1-ex1"
|
||||
gcc -o lab1-ex1.exe lab1-ex1.c
|
||||
strace -c ./lab1-ex1.exe
|
||||
echo "watch the interrupts in linux"
|
||||
more /proc/interrupts
|
||||
```
|
||||
|
||||
Try to analysis the means of these output log.
|
||||
Reference in New Issue
Block a user