Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

objdump output - what do the columns represent? [duplicate]

I ran objdump -r on an object file and got the following output. What do each of the columns represent here? I might have missed it, but the documentation doesn't specify.

simple.o:     file format elf64-x86-64


Disassembly of section .text:
0000000000000000 <main>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   48 83 ec 30             sub    $0x30,%rsp
   8:   64 48 8b 04 25 28 00    mov    %fs:0x28,%rax
   f:   00 00 
  11:   48 89 45 f8             mov    %rax,-0x8(%rbp)
  15:   31 c0                   xor    %eax,%eax
  17:   c7 45 d8 00 00 00 00    movl   $0x0,-0x28(%rbp)
  1e:   eb 64                   jmp    84 <main+0x84>
  20:   8b 45 d8                mov    -0x28(%rbp),%eax
  23:   89 c7                   mov    %eax,%edi
  25:   e8 00 00 00 00          callq  2a <main+0x2a>
                        26: R_X86_64_PC32       foo-0x4
  2a:   89 45 dc                mov    %eax,-0x24(%rbp)
  2d:   8b 55 dc                mov    -0x24(%rbp),%edx
  30:   48 8d 45 e0             lea    -0x20(%rbp),%rax

etc

like image 538
Matty Avatar asked Aug 01 '11 04:08

Matty


People also ask

What is the output of objdump?

objdump displays information about one or more object files. The options control what particular information to display. This information is mostly useful to programmers who are working on the compilation tools, as opposed to programmers who just want their program to compile and work.

What does * und * mean in symbol table?

Next is the section with which the symbol is associated or *ABS* if the section is absolute (ie not connected with any section), or *UND* if the section is referenced in the file being dumped, but not defined there.

What objdump does?

objdump is a command-line program for displaying various information about object files on Unix-like operating systems. For instance, it can be used as a disassembler to view an executable in assembly form. It is part of the GNU Binutils for fine-grained control over executables and other binary data.

What is objdump C?

Objdump displays information about one or more object files, either on their own, or inside libraries. It is commonly used as a disassembler, but it can also display information about file headers, symbol tables, relocations, debugging directives and more.


1 Answers

Isn't it self explanatory:

Offset, Machine code, Corresponding Assembly code

like image 113
Madhur Ahuja Avatar answered Sep 28 '22 04:09

Madhur Ahuja