标签:指针 art fun main res 汇编 背景 ubuntu reg
int main() { char *p_char = 0; int *p_int = 0; p_char++; p_int++; } .file "test.c" .text .globl main .type main, @function main: .LFB0: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 subl $16, %esp movl $0, -8(%ebp) movl $0, -4(%ebp) addl $1, -8(%ebp) addl $4, -4(%ebp) movl $0, %eax leave .cfi_restore 5 .cfi_def_cfa 4, 4 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609" .section .note.GNU-stack,"",@progbits
留意汇编中红色背景标出的地方。
标签:指针 art fun main res 汇编 背景 ubuntu reg
原文地址:https://www.cnblogs.com/rivsidn/p/9226610.html