【发布时间】:2013-03-08 08:53:44
【问题描述】:
我正在使用 glibc-2.13-1 运行 64 位 Debian 4.7.2-5 Linux 系统。当我在libc.a 中搜索一些函数调用的汇编代码时,我遇到了这个:
file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <sync>:
0: b9 a2 00 00 00 mov eax,0xa2
5: 0f 05 syscall
7: 48 3d 01 f0 ff ff cmp rax,0xfffffffffffff001
d: 0f 83 00 00 00 00 jae 13 <sync+0x13>
13: c3 ret
我对这是做什么感到有点困惑。 mov eax,0xa2 的意义何在?如果这是一台 64 位机器,为什么不使用 rax 寄存器(系统调用如何知道要进行什么系统调用)?简而言之:这 5 行代码是做什么的?
【问题讨论】:
标签: linux assembly x86-64 system-calls