Why does not XORing %eax causes segfault? [duplicate]
问题 This question already has answers here : Segmentation fault on printf - NASM 64bit Linux (1 answer) Calling printf in x86_64 using GNU assembler (2 answers) main and stack alignment (1 answer) Why does System V / AMD64 ABI mandate a 16 byte stack alignment? (1 answer) Closed 12 days ago . .text having this: str: .string "string" .globl main main: xor %eax, %eax #is commented causes segfault leaq str(%rip), %rdi call printf xorq %rdi, %rdi call exit Does printf uses %rax ? or is the segfault