Browse Source

update related_info

main
yuchen 9 years ago
parent
commit
749f4e3f93
9 changed files with 59 additions and 31 deletions
  1. +1
    -0
      .gitignore
  2. +12
    -4
      related_info/lab1/Makefile
  3. +15
    -0
      related_info/lab1/lab1-ex0.md
  4. +0
    -0
      related_info/lab1/lab1-ex0.s
  5. +0
    -0
      related_info/lab1/lab1-ex1.c
  6. +12
    -0
      related_info/lab1/lab1-ex1.md
  7. +0
    -8
      related_info/lec2/Makefile

+ 1
- 0
.gitignore View File

@ -16,3 +16,4 @@ tags
*.workspace
a.out
make.log
*.exe

+ 12
- 4
related_info/lab1/Makefile View File

@ -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
- 0
related_info/lab1/lab1-ex0.md View 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.

related_info/lab1/write.s → related_info/lab1/lab1-ex0.s View File


related_info/lec2/hello.c → related_info/lab1/lab1-ex1.c View File


+ 12
- 0
related_info/lab1/lab1-ex1.md View 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.

+ 0
- 8
related_info/lec2/Makefile View File

@ -1,8 +0,0 @@
all: hello.c
echo "compile and watch the syscalls from hello"
gcc -o hello hello.c
strace -c ./hello
echo "watch the interrupts in linux"
more /proc/interrupts
clean:
rm ./hello

Loading…
Cancel
Save