2017-2018-1 20155321 《信息安全系统设计基础》第五周学习总结
教材学习内容总结
- 本周主要学习了汇编语言,其夹在高级语言与机器语言之间。本章主要展现了编译器以及底层是如何调用寄存器、内存、栈来实现程序的基本结构及其功能。
- 学会了看汇编代码以及使用
odjdump
命令进行反编译
教材学习中的问题和解决过程
- 问题1:对于语句
long t4 = t2 - t3;
从右边的汇编代码中可以看出,在完成对t3的赋值时,t3被放置在寄存器esi中,t2被放置在寄存器rax中,那么在执行t4的赋值时,为什么汇编代码是subq %rsi,%rax
,而不是subq %esi,%rax
?
-
问题1解决方案:对于命令的语法规则理解有错,rsi寄存器里的低32位就是esi寄存器,又因为命令中q代表了操作数必须是64位的,因此命令就是
subq %rsi,&rax
-
问题2:对于leap指令,教材P129说其可以简洁地描述普通的算术操作,这是怎么做到的?leap命令不是相当于把地址传给目的地址吗?以下是书本提的例子。
- 问题2解决方案:暂时仍未解决
代码调试中的问题和解决过程
无
代码托管
上周考试错题总结
-
错题1:gcc hello.c产生的a.out属于()
A .可重定位目标文件 B .可执行目标文件 C .共享目标文件 D .目标模块或目标文件
-
原因:正确答案选B。
-
理解情况:课本P467写道,直到今天,可执行文件仍然称为a.out文件
-
错题2:编译驱动程序gcc -c 会调用()
A .预处理器 B .编译器 C .汇编器 D .链接器 -
原因:正确答案选C,我错选了B。
-
理解情况:我以为gcc -c是调用预处理器、编译器和汇编器三者,原来-c参数只是调用了汇编器。
本周结对学习情况
- 20155330
- 结对学习内容
- 书本第三章的内容
学习进度条
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 20篇 | 400小时 | |
第五周 | 144/422 | 1/5 | 15/75 | |
尝试一下记录「计划学习时间」和「实际学习时间」,到期末看看能不能改进自己的计划能力。这个工作学习中很重要,也很有用。
耗时估计的公式
:Y=X+X/N ,Y=X-X/N,训练次数多了,X、Y就接近了。
-
计划学习时间:12小时
-
实际学习时间:15小时
-
改进情况:改善自学看书的方法,提高看书学习效率
(有空多看看现代软件工程 课件 软件工程师能力自我评价表)