我写了一段C代码,然后我反汇编它并阅读寄存器,以便理解程序在汇编中的工作方式。
int test(char *this){
char sum_buf[6];
strncpy(sum_buf,this,32);
return 0;
}
我一直在检查的代码片段是测试函数。当我反汇编我的测试函数输出时,我得到了...
0x00000000004005c0 <+12>: mov %fs:0x28,%rax
=> 0x00000000004005c9 <+21>: mov %rax,-0x8(%rbp)
... stuff ..
0x00000000004005f0 <+60>: xor %fs:0x28,%rdx
0x00000000004005f9 <+69>: je 0x400600 <test+76>
0x00000000004005fb <+71>: callq 0x4004a0 <__stack_chk_fail@plt>
0x0000000000400600 <+76>: leaveq
0x0000000000400601 <+77>: retq
我想知道mov %fs:0x28,%rax
实际上是做什么的?