C语言 图文并茂详解程序编译过程

  .file "demo.c"

  .globl p

  .section .rodata

  .LC0:

  .string "Autumn"

  .data

  .align 4

  .type p, @object

  .size p, 4

  p:

  .long .LC0

  .globl i

  .bss

  .align 4

  .type i, @object

  .size i, 4

  i:

  .zero 4

  .section .rodata

  .LC1:

  .string "Hello world!"

  .text

  .globl main

  .type main, @function

  main:

  pushl %ebp

  movl %esp, %ebp

  movl $.LC1, p

  movl i, %eax

  addl $1, %eax

  movl %eax, i

  movl $0, %eax

  popl %ebp

  ret

  .size main, .-main

  .ident "GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5.1) 4.4.5"

  .section .note.GNU-stack,"",@progbits