previous | start | next

Example: objdump

The ouptput of

$ objdump -d sumFirst.o 
     

shows how the bytes of sumFirst.o are grouped together to correspond to the machine instructions.

The machine instructions are also disassembled (-d option) to show their form as assembly language instructions.

sumFirst.o:     file format elf32-i386

Disassembly of section .text:

00000000 <sumFirst>:
   0:   55                      push   %ebp
   1:   89 e5                   mov    %esp,%ebp
   3:   83 ec 10                sub    $0x10,%esp
   6:   c7 45 f8 00 00 00 00    movl   $0x0,0xfffffff8(%ebp)
   d:   c7 45 fc 01 00 00 00    movl   $0x1,0xfffffffc(%ebp)
  14:   eb 0a                   jmp    20 <sumFirst+0x20>
  16:   8b 45 fc                mov    0xfffffffc(%ebp),%eax
  19:   01 45 f8                add    %eax,0xfffffff8(%ebp)
  1c:   83 45 fc 01             addl   $0x1,0xfffffffc(%ebp)
  20:   8b 45 fc                mov    0xfffffffc(%ebp),%eax
  23:   3b 45 08                cmp    0x8(%ebp),%eax
  26:   7e ee                   jle    16 <sumFirst+0x16>
  28:   8b 45 f8                mov    0xfffffff8(%ebp),%eax
  2b:   c9                      leave
  2c:   c3                      ret
        
     


previous | start | next