C -Disassembly

#include <stdio.h>

main(){
    printf("Hello\n");
}

このプログラムを逆アセンブルすると、以下の様になる。
---------------------------------------------------------------------------------

[hoge@hoge C]$ gcc hello.c -c;objdump -d hello.o

hello.o:     file format elf32-i386


Disassembly of section .text:

00000000 <main>:
   0:   8d 4c 24 04             lea    0x4(%esp),%ecx
   4:   83 e4 f0                and    $0xfffffff0,%esp
   7:   ff 71 fc                pushl  -0x4(%ecx)
   a:   55                      push   %ebp
   b:   89 e5                   mov    %esp,%ebp
   d:   51                      push   %ecx
   e:   83 ec 04                sub    $0x4,%esp
  11:   83 ec 0c                sub    $0xc,%esp
  14:   68 00 00 00 00          push   $0x0
  19:   e8 fc ff ff ff          call   1a <main+0x1a>
  1e:   83 c4 10                add    $0x10,%esp
  21:   8b 4d fc                mov    -0x4(%ebp),%ecx
  24:   c9                      leave
  25:   8d 61 fc                lea    -0x4(%ecx),%esp
  28:   c3                      ret
最終更新:2012年12月24日 15:28
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。