Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: ASM (NASM) | Size: 0.46 KB | Hits: 11 | Expires: Never
Copy text to clipboard
  1. GCC :
  2.  
  3.         .file   "testcase.c"
  4.         .text
  5. .globl _bar
  6.         .def    _bar;   .scl    2;      .type   32;     .endef
  7. _bar:
  8.         pushl   %ebp
  9.         movl    %esp, %ebp
  10.         subl    $24, %esp
  11.         movl    $0, (%esp)
  12.         movl    __imp__foo, %eax
  13.         call    *%eax
  14.         leave
  15.         ret
  16.  
  17.  
  18. Clang :
  19.  
  20.  
  21.         .def     _bar;  .scl    2;      .type   32;     .endef
  22.         .text
  23.         .globl  _bar
  24.         .align  16
  25. _bar:
  26.         pushl   %ebp
  27.         movl    %esp, %ebp
  28.         subl    $8, %esp
  29.         movl    $0, (%esp)
  30.         call    _foo
  31.         addl    $8, %esp
  32.         popl    %ebp
  33.         ret
  34.  
  35.  
  36.         .def     _foo;  .scl    2;      .type   32;     .endef