Browse Source

add little prog for lec7

main
chyyuu 11 years ago
parent
commit
6cc93362e5
2 changed files with 31 additions and 0 deletions
  1. +19
    -0
      related_info/lec7-8/Makefile
  2. +12
    -0
      related_info/lec7-8/lec7_1.c

+ 19
- 0
related_info/lec7-8/Makefile View File

@ -0,0 +1,19 @@
all: lec7_1.c
@echo "====================================="
@echo "compile and analysis lec7_1"
@echo "====================================="
gcc -g -o lec7_1 lec7_1.c
@echo "====================================="
@echo "using objdump to decompile lec7_1"
@echo "====================================="
objdump -S lec7_1
@echo "====================================="
@echo "using readelf to analyze lec7_1"
@echo "====================================="
readelf -a lec7_1
@echo "====================================="
@echo "using nm to analyze lec7_1"
@echo "====================================="
nm lec7_1
clean:
rm ./lec7_1

+ 12
- 0
related_info/lec7-8/lec7_1.c View File

@ -0,0 +1,12 @@
void X(int b) {
if (b==1){
printf("X:: b is 1!\n");
}else{
printf("X:: b is not 1!\n");
}
}
int main(int argc, char * argv){
int a=2;
X(a);
}

Loading…
Cancel
Save