40 lines · plain
1 .text2 .globl bar3bar:4 .cfi_startproc5 leal (%edi, %edi), %eax6 ret7 .cfi_endproc8 9 .globl foo10foo:11 .cfi_startproc12 .cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c13 call bar14 addl $1, %eax15 popq %rdi16 subq $0x47, %rdi17 jmp *%rdi # Return18 .cfi_endproc19 20 .globl asm_main21asm_main:22 .cfi_startproc23 pushq %rbp24 .cfi_def_cfa_offset 1625 .cfi_offset 6, -1626 movq %rsp, %rbp27 .cfi_def_cfa_register 628 movl $47, %edi29 30 # Non-standard calling convention. The real return address must be31 # decremented by 0x47.32 leaq 0x47+1f(%rip), %rax33 pushq %rax34 jmp foo # call351:36 popq %rbp37 .cfi_def_cfa 7, 838 ret39 .cfi_endproc40