[어셈블리어 분석 실습] example 4
example4.asm의 코드는 아래와 같다. # example4.asm .file"example4.c" .section.rodata .LC0: .string"result : %d\n" .text .globlfunction .typefunction, @function function: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl%edi, -4(%rbp) movl%esi, -8(%rbp) movl-4(%rbp), %eax imull-8(%rbp), %eax movl%eax, %esi movl$.LC0, %edi mov..
2022. 5. 8.
[어셈블리어 분석 실습] example 2
example2.asm의 코드는 아래와 같다. # example2.asm .file"example2.c" .section.rodata .LC0: .string"result : %d \n" .text .globlmain .typemain, @function main: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl$10, -12(%rbp) movl$20, -8(%rbp) movl-8(%rbp), %eax movl-12(%rbp), %edx addl%edx, %eax movl%eax, -4(%rbp) movl-8(%rbp)..
2022. 5. 8.